Module: wine Branch: master Commit: dfa9f4bc26d78bb27f411cda3a176783726de907 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dfa9f4bc26d78bb27f411cda3a...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Jan 24 17:31:38 2012 +0100
wininet: Insert custom headers only once in HTTP_HttpSendRequestW.
---
dlls/wininet/http.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 24e55b3..3c5ed9c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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);