wininet: Send HTTP/1.1 requests by default.
This commit is contained in:
parent
b069ef4268
commit
c132dd9360
|
@ -62,7 +62,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
static const WCHAR g_szHttp1_0[] = {' ','H','T','T','P','/','1','.','0',0 };
|
||||
static const WCHAR g_szHttp1_1[] = {' ','H','T','T','P','/','1','.','1',0 };
|
||||
static const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
|
||||
static const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
|
||||
|
@ -257,7 +256,7 @@ static void HTTP_FixURL( LPWININETHTTPREQW lpwhr)
|
|||
}
|
||||
}
|
||||
|
||||
static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR verb, LPCWSTR path, BOOL http1_1 )
|
||||
static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR verb, LPCWSTR path )
|
||||
{
|
||||
LPWSTR requestString;
|
||||
DWORD len, n;
|
||||
|
@ -279,7 +278,7 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
|
|||
req[n++] = verb;
|
||||
req[n++] = szSpace;
|
||||
req[n++] = path;
|
||||
req[n++] = http1_1 ? g_szHttp1_1 : g_szHttp1_0;
|
||||
req[n++] = g_szHttp1_1;
|
||||
|
||||
/* Append custom request headers */
|
||||
for (i = 0; i < lpwhr->nCustHeaders; i++)
|
||||
|
@ -1650,7 +1649,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
|
|||
BOOL ret;
|
||||
|
||||
if (request_only)
|
||||
headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, FALSE);
|
||||
headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath);
|
||||
else
|
||||
headers = lpwhr->lpszRawHeaders;
|
||||
|
||||
|
@ -2520,7 +2519,7 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr)
|
|||
|
||||
lpszPath = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( lpwhs->lpszHostName ) + 13)*sizeof(WCHAR) );
|
||||
sprintfW( lpszPath, szFormat, lpwhs->lpszHostName, lpwhs->nHostPort );
|
||||
requestString = HTTP_BuildHeaderRequestString( lpwhr, szConnect, lpszPath, FALSE );
|
||||
requestString = HTTP_BuildHeaderRequestString( lpwhr, szConnect, lpszPath );
|
||||
HeapFree( GetProcessHeap(), 0, lpszPath );
|
||||
|
||||
len = WideCharToMultiByte( CP_ACP, 0, requestString, -1,
|
||||
|
@ -2615,7 +2614,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
|
|||
HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE);
|
||||
}
|
||||
|
||||
requestString = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, FALSE);
|
||||
requestString = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath);
|
||||
|
||||
TRACE("Request header -> %s\n", debugstr_w(requestString) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue