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

This commit is contained in:
Hans Leidekker 2008-12-02 17:15:07 +01:00 committed by Alexandre Julliard
parent 5a2c9de2e8
commit a57cc6dcf6
1 changed files with 10 additions and 0 deletions

View File

@ -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;