Commit dfa9f4bc authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Insert custom headers only once in HTTP_HttpSendRequestW.

parent ac26517a
......@@ -4707,6 +4707,10 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
HTTP_HttpAddRequestHeadersW(request, cache_control, strlenW(cache_control), HTTP_ADDREQ_FLAG_ADD_IF_NEW);
}
/* add the headers the caller supplied */
if( lpszHeaders && dwHeaderLength )
HTTP_HttpAddRequestHeadersW(request, lpszHeaders, dwHeaderLength, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE);
do
{
DWORD len;
......@@ -4740,13 +4744,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES))
HTTP_InsertCookies(request);
/* add the headers the caller supplied */
if( lpszHeaders && dwHeaderLength )
{
HTTP_HttpAddRequestHeadersW(request, lpszHeaders, dwHeaderLength,
HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE);
}
if (request->session->appInfo->proxy && request->session->appInfo->proxy[0])
{
WCHAR *url = HTTP_BuildProxyRequestUrl(request);
......
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