From 563546642e80eeeb8bd9c07dc24bb136c7bd5e85 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 4 Oct 2002 08:11:59 +0000 Subject: MFC: 1.61: Reincarnate HTTP authentication code. Approved by: re (jhb) --- lib/libfetch/http.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libfetch/http.c') diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 04b7964612fe..3c9e61b592ce 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -946,10 +946,6 @@ _http_request(struct url *URL, const char *op, struct url_stat *us, } } while (h > hdr_end); - /* we have a hit or an error */ - if (code == HTTP_OK || code == HTTP_PARTIAL || HTTP_ERROR(code)) - break; - /* we need to provide authentication */ if (code == HTTP_NEED_AUTH) { need_auth = 1; @@ -957,6 +953,10 @@ _http_request(struct url *URL, const char *op, struct url_stat *us, fd = -1; continue; } + + /* we have a hit or an error */ + if (code == HTTP_OK || code == HTTP_PARTIAL || HTTP_ERROR(code)) + break; /* all other cases: we got a redirect */ need_auth = 0; -- cgit v1.3