summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2016-05-31 08:27:39 +0000
committerdes <des@FreeBSD.org>2016-05-31 08:27:39 +0000
commitfe4583687467a86329a6694fc2f49189ecb89a19 (patch)
treec619a6ba1631430b9f3b3cd9f6f657c53618e051
parentcc56a0764460ee7efa2bfd30102660afb721702c (diff)
downloadFreeBSD-src-fe4583687467a86329a6694fc2f49189ecb89a19.zip
FreeBSD-src-fe4583687467a86329a6694fc2f49189ecb89a19.tar.gz
r169386 (PR 112515) was incomplete: it treated 307 as an error except
in verbose mode, and did not handle 308 at all. r241840 (PR 172451) added support for 308, but with the same bug. Correctly handle both by recognizing them as redirects in all places where we check the HTTP result code. PR: 112515 173451 209546 Submitted by: novel@ MFC after: 1 week
-rw-r--r--lib/libfetch/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index f80404d..0c575d0 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -114,6 +114,7 @@ __FBSDID("$FreeBSD$");
#define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \
|| (xyz) == HTTP_MOVED_TEMP \
|| (xyz) == HTTP_TEMP_REDIRECT \
+ || (xyz) == HTTP_PERM_REDIRECT \
|| (xyz) == HTTP_USE_PROXY \
|| (xyz) == HTTP_SEE_OTHER)
@@ -1767,6 +1768,8 @@ http_request_body(struct url *URL, const char *op, struct url_stat *us,
break;
case HTTP_MOVED_PERM:
case HTTP_MOVED_TEMP:
+ case HTTP_TEMP_REDIRECT:
+ case HTTP_PERM_REDIRECT:
case HTTP_SEE_OTHER:
case HTTP_USE_PROXY:
/*
OpenPOWER on IntegriCloud