From bf8350af626e5064de45a61d945f6e249651f1db Mon Sep 17 00:00:00 2001 From: hniksic Date: Fri, 5 Dec 2003 06:37:47 -0800 Subject: [PATCH] [svn] Support the 303 See Other response. --- src/ChangeLog | 6 ++++++ src/http.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d5b86c02..e580c25c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-12-05 Hrvoje Niksic + + * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other" + response code. + Suggested by Dan Razzell. + 2003-11-30 Hrvoje Niksic * retr.c (fd_read_body): Report the amount of data *written* as diff --git a/src/http.c b/src/http.c index a305cbe9..609e5fab 100644 --- a/src/http.c +++ b/src/http.c @@ -92,8 +92,9 @@ struct cookie_jar *wget_cookie_jar; /* Some status code validation macros: */ #define H_20X(x) (((x) >= 200) && ((x) < 300)) #define H_PARTIAL(x) ((x) == HTTP_STATUS_PARTIAL_CONTENTS) -#define H_REDIRECTED(x) ((x) == HTTP_STATUS_MOVED_PERMANENTLY \ - || (x) == HTTP_STATUS_MOVED_TEMPORARILY \ +#define H_REDIRECTED(x) ((x) == HTTP_STATUS_MOVED_PERMANENTLY \ + || (x) == HTTP_STATUS_MOVED_TEMPORARILY \ + || (x) == HTTP_STATUS_SEE_OTHER \ || (x) == HTTP_STATUS_TEMPORARY_REDIRECT) /* HTTP/1.0 status codes from RFC1945, provided for reference. */ @@ -108,8 +109,9 @@ struct cookie_jar *wget_cookie_jar; #define HTTP_STATUS_MULTIPLE_CHOICES 300 #define HTTP_STATUS_MOVED_PERMANENTLY 301 #define HTTP_STATUS_MOVED_TEMPORARILY 302 +#define HTTP_STATUS_SEE_OTHER 303 /* from HTTP/1.1 */ #define HTTP_STATUS_NOT_MODIFIED 304 -#define HTTP_STATUS_TEMPORARY_REDIRECT 307 +#define HTTP_STATUS_TEMPORARY_REDIRECT 307 /* from HTTP/1.1 */ /* Client error 4xx. */ #define HTTP_STATUS_BAD_REQUEST 400 -- 2.39.2