From f8f9c4cb9cc45075b829e3ffbdeb88a6c00c0ece Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 9 Sep 2008 16:42:11 +0200 Subject: [PATCH] winhttp: Don't loop on response codes other than 301 and 302. --- dlls/winhttp/request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index b11c426d64c..ada8ae65241 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)