Module: wine Branch: master Commit: a57cc6dcf63cf56ba18ec7de1a8b3add846c95b8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a57cc6dcf63cf56ba18ec7de1a...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Dec 2 17:15:07 2008 +0100
wininet: Support setting username and password options on request handles.
---
dlls/wininet/http.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 9cb8985..f9b0e5c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1617,6 +1617,16 @@ static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buf
return NETCON_set_timeout(&req->netConnection, option == INTERNET_OPTION_SEND_TIMEOUT, *(DWORD*)buffer); + + case INTERNET_OPTION_USERNAME: + HeapFree(GetProcessHeap(), 0, req->lpHttpSession->lpszUserName); + if (!(req->lpHttpSession->lpszUserName = WININET_strdupW(buffer))) return ERROR_OUTOFMEMORY; + return ERROR_SUCCESS; + + case INTERNET_OPTION_PASSWORD: + HeapFree(GetProcessHeap(), 0, req->lpHttpSession->lpszPassword); + if (!(req->lpHttpSession->lpszPassword = WININET_strdupW(buffer))) return ERROR_OUTOFMEMORY; + return ERROR_SUCCESS; }
return ERROR_INTERNET_INVALID_OPTION;