mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wininet: Read status code directly from request object in InternetErrorDlg.
This commit is contained in:
parent
ebff6036bf
commit
74f596c5ed
1 changed files with 2 additions and 28 deletions
|
@ -476,28 +476,6 @@ static INT_PTR WINAPI WININET_InvalidCertificateDialog(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WININET_GetConnectionStatus
|
||||
*/
|
||||
static INT WININET_GetConnectionStatus( HINTERNET hRequest )
|
||||
{
|
||||
WCHAR szStatus[0x20];
|
||||
DWORD sz, index, dwStatus;
|
||||
|
||||
TRACE("%p\n", hRequest );
|
||||
|
||||
sz = sizeof szStatus;
|
||||
index = 0;
|
||||
if( !HttpQueryInfoW( hRequest, HTTP_QUERY_STATUS_CODE,
|
||||
szStatus, &sz, &index))
|
||||
return -1;
|
||||
dwStatus = atoiW( szStatus );
|
||||
|
||||
TRACE("request %p status = %d\n", hRequest, dwStatus );
|
||||
|
||||
return dwStatus;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InternetErrorDlg
|
||||
*/
|
||||
|
@ -531,16 +509,12 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
|
|||
{
|
||||
case ERROR_SUCCESS:
|
||||
case ERROR_INTERNET_INCORRECT_PASSWORD: {
|
||||
DWORD dwStatus;
|
||||
|
||||
if( !dwError && !(dwFlags & FLAGS_ERROR_UI_FILTER_FOR_ERRORS ) )
|
||||
break;
|
||||
if(!req)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
||||
dwStatus = WININET_GetConnectionStatus( hRequest );
|
||||
switch (dwStatus)
|
||||
{
|
||||
switch(req->status_code) {
|
||||
case HTTP_STATUS_PROXY_AUTH_REQ:
|
||||
res = DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_PROXYDLG ),
|
||||
hWnd, WININET_ProxyPasswordDialog, (LPARAM) ¶ms );
|
||||
|
@ -550,7 +524,7 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
|
|||
hWnd, WININET_PasswordDialog, (LPARAM) ¶ms );
|
||||
break;
|
||||
default:
|
||||
WARN("unhandled status %u\n", dwStatus);
|
||||
WARN("unhandled status %u\n", req->status_code);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue