Hans Leidekker : wininet: Support setting username and password options on request handles.

Alexandre Julliard julliard at winehq.org
Wed Dec 3 05:56:20 CST 2008


Module: wine
Branch: master
Commit: a57cc6dcf63cf56ba18ec7de1a8b3add846c95b8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a57cc6dcf63cf56ba18ec7de1a8b3add846c95b8

Author: Hans Leidekker <hans at 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;




More information about the wine-cvs mailing list