wininet: Insert custom headers only once in HTTP_HttpSendRequestW.
This commit is contained in:
parent
ac26517ac9
commit
dfa9f4bc26
|
@ -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);
|
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
|
do
|
||||||
{
|
{
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -4740,13 +4744,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
||||||
if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES))
|
if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES))
|
||||||
HTTP_InsertCookies(request);
|
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])
|
if (request->session->appInfo->proxy && request->session->appInfo->proxy[0])
|
||||||
{
|
{
|
||||||
WCHAR *url = HTTP_BuildProxyRequestUrl(request);
|
WCHAR *url = HTTP_BuildProxyRequestUrl(request);
|
||||||
|
|
Loading…
Reference in New Issue