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

wininet: Send HTTP/1.1 requests by default.

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