Module: wine Branch: master Commit: f8f9c4cb9cc45075b829e3ffbdeb88a6c00c0ece URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8f9c4cb9cc45075b829e3ffbd...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Sep 9 16:42:11 2008 +0200
winhttp: Don't loop on response codes other than 301 and 302.
---
dlls/winhttp/request.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index b11c426..ada8ae6 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1267,14 +1267,16 @@ static BOOL receive_response( request_t *request, BOOL async ) if (!query_headers( request, query, NULL, &request->content_length, &size, NULL )) request->content_length = ~0UL;
- if (status == 200) break; if (status == 301 || status == 302) { if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break; drain_content( request ); if (!(ret = handle_redirect( request ))) break; + ret = send_request( request, NULL, 0, NULL, 0, 0, 0, FALSE ); /* recurse synchronously */ + continue; } - ret = send_request( request, NULL, 0, NULL, 0, 0, 0, FALSE ); /* recurse synchronously */ + if (status == 401) FIXME("authentication not supported\n"); + break; }
if (async)