Hans Leidekker : wininet: Don' t change the verb if the server response is HTTP_STATUS_REDIRECT_KEEP_VERB.

Alexandre Julliard julliard at winehq.org
Wed Jun 1 12:11:07 CDT 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Jun  1 11:50:32 2011 +0200

wininet: Don't change the verb if the server response is HTTP_STATUS_REDIRECT_KEEP_VERB.

---

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

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index a8dbd3d..cc9d480 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -4734,7 +4734,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
                      dwStatusCode == HTTP_STATUS_REDIRECT_METHOD) &&
                     HTTP_HttpQueryInfoW(request,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL) == ERROR_SUCCESS)
                 {
-                    if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD))
+                    if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD) &&
+                        dwStatusCode != HTTP_STATUS_REDIRECT_KEEP_VERB)
                     {
                         HeapFree(GetProcessHeap(), 0, request->verb);
                         request->verb = heap_strdupW(szGET);
@@ -4904,7 +4905,8 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
             dwBufferSize=sizeof(szNewLocation);
             if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_LOCATION, szNewLocation, &dwBufferSize, NULL) == ERROR_SUCCESS)
             {
-                if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD))
+                if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD) &&
+                    dwCode != HTTP_STATUS_REDIRECT_KEEP_VERB)
                 {
                     HeapFree(GetProcessHeap(), 0, request->verb);
                     request->verb = heap_strdupW(szGET);




More information about the wine-cvs mailing list