Date: Mon, 29 Oct 2012 04:18:34 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242293 - stable/9/lib/libfetch Message-ID: <201210290418.q9T4IYG8074695@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Mon Oct 29 04:18:34 2012 New Revision: 242293 URL: http://svn.freebsd.org/changeset/base/242293 Log: MFC r241841: Implement HTTP 305 redirect handling. PR: 172452 Approved by: cperciva (implicit) Modified: stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Mon Oct 29 04:18:34 2012 (r242292) +++ stable/9/lib/libfetch/http.c Mon Oct 29 04:18:34 2012 (r242293) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 +#define HTTP_USE_PROXY 305 #define HTTP_TEMP_REDIRECT 307 #define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 @@ -105,6 +106,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \ || (xyz) == HTTP_MOVED_TEMP \ || (xyz) == HTTP_TEMP_REDIRECT \ + || (xyz) == HTTP_USE_PROXY \ || (xyz) == HTTP_SEE_OTHER) #define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599) @@ -1689,6 +1691,7 @@ http_request(struct url *URL, const char case HTTP_MOVED_PERM: case HTTP_MOVED_TEMP: case HTTP_SEE_OTHER: + case HTTP_USE_PROXY: /* * Not so fine, but we still have to read the * headers to get the new location. @@ -1770,7 +1773,8 @@ http_request(struct url *URL, const char */ if (noredirect && conn->err != HTTP_MOVED_PERM && - conn->err != HTTP_PERM_REDIRECT) { + conn->err != HTTP_PERM_REDIRECT && + conn->err != HTTP_USE_PROXY) { n = 1; break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210290418.q9T4IYG8074695>