Date: Tue, 31 May 2016 08:27:39 +0000 (UTC) From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301027 - head/lib/libfetch Message-ID: <201605310827.u4V8RdC8015083@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Tue May 31 08:27:39 2016 New Revision: 301027 URL: https://svnweb.freebsd.org/changeset/base/301027 Log: 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 Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Tue May 31 08:07:40 2016 (r301026) +++ head/lib/libfetch/http.c Tue May 31 08:27:39 2016 (r301027) @@ -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 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: /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605310827.u4V8RdC8015083>