Hans Leidekker : winhttp: Strip content-type/ length headers from request on a redirect.

Alexandre Julliard julliard at winehq.org
Thu Sep 11 08:01:26 CDT 2008


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Sep 11 14:20:06 2008 +0200

winhttp: Strip content-type/length headers from request on a redirect.

---

 dlls/winhttp/request.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 6564e28..c149aca 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -1048,6 +1048,7 @@ static BOOL handle_redirect( request_t *request )
     connect_t *connect = request->connect;
     INTERNET_PORT port;
     WCHAR *hostname = NULL, *location = NULL;
+    int index;
 
     size = 0;
     query_headers( request, WINHTTP_QUERY_LOCATION, NULL, NULL, &size, NULL );
@@ -1115,6 +1116,10 @@ static BOOL handle_redirect( request_t *request )
         }
     }
 
+    /* remove content-type/length headers */
+    if ((index = get_header_index( request, attr_content_type, 0, TRUE )) >= 0) delete_header( request, index );
+    if ((index = get_header_index( request, attr_content_length, 0, TRUE )) >= 0 ) delete_header( request, index );
+
     /* redirects are always GET requests */
     heap_free( request->verb );
     request->verb = NULL;




More information about the wine-cvs mailing list