Commit a57cc6dc authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 5a2c9de2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment