summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2017-01-10 08:12:56 +0000
committerRenato Botelho <renato@netgate.com>2017-08-15 10:41:36 -0300
commit784d520879f4295a096dc64007c0ced06520da9a (patch)
tree2c7edbc651e37afdf78490b4cc6b7c50195ff17f
parenta9101a80183bbf3e77d7fed2b9767f7eae54f1e9 (diff)
downloadFreeBSD-src-RELENG_2_3.zip
FreeBSD-src-RELENG_2_3.tar.gz
MFH (r301027): fix 307 / 308 redirectsRELENG_2_3
MFH (r310823): fix multi-line CONNECT responses PR: 112515 173451 194483 209546 (cherry picked from commit 01bace6361f834a727e24dcc7434e8f91ac69f5b)
-rw-r--r--lib/libfetch/http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index ca522a6..2267c13 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)
@@ -1431,7 +1432,7 @@ http_connect(struct url *URL, struct url *purl, const char *flags)
default:
/* ignore */ ;
}
- } while (h < hdr_end);
+ } while (h > hdr_end);
}
if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 &&
fetch_ssl(conn, URL, verbose) == -1) {
@@ -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