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:
                        /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to