Rob Shearman : wininet: Fix the handling of Accept types passed into HttpOpenRequest

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 8 06:35:41 CST 2007


Module: wine
Branch: master
Commit: a9c2cfa8d9424406268f74f29bfe30656f37b665
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a9c2cfa8d9424406268f74f29bfe30656f37b665

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Jan  7 12:53:50 2007 +0000

wininet: Fix the handling of Accept types passed into HttpOpenRequest
by properly coalescing all the types into the Accept header value,
rather than just adding the first.

---

 dlls/wininet/http.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index eb842b1..cb8b844 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1113,7 +1113,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(L
     {
         int i;
         for(i=0;lpszAcceptTypes[i]!=NULL;i++)
-            HTTP_ProcessHeader(lpwhr, HTTP_ACCEPT, lpszAcceptTypes[i], HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_REQ|HTTP_ADDHDR_FLAG_ADD_IF_NEW);
+            HTTP_ProcessHeader(lpwhr, HTTP_ACCEPT, lpszAcceptTypes[i],
+                               HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_REQ|(i == 0 ? HTTP_ADDHDR_FLAG_REPLACE : 0));
     }
 
     if (NULL == lpszVerb)




More information about the wine-cvs mailing list