commit fefc2d2a99b05e6a015e406736b6b35a6dc517eb
parent 51d55e5cce11218e5783fdd2a42ac8ba35564dc9
Author: ukai <ukai>
Date: Wed, 8 Oct 2003 14:51:33 +0000
[w3m-dev 03985] Re: support for 307 Temporary Redirect
* file.c (loadGeneralFile): support 307 Temporary Redirect
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-08 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03985] Re: support for 307 Temporary Redirect
+ * file.c (loadGeneralFile): support 307 Temporary Redirect
+
2003-10-06 Fumitoshi UKAI <ukai@debian.or.jp>
* fix build error --disbable-m17n
diff --git a/file.c b/file.c
@@ -1710,10 +1710,15 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
}
#endif
readHeader(&f, t_buf, FALSE, &pu);
- if (http_response_code >= 301 && http_response_code <= 303
+ if (((http_response_code >= 301 && http_response_code <= 303)
+ || http_response_code == 307)
&& (p = checkHeader(t_buf, "Location:")) != NULL
&& checkRedirection(&pu)) {
/* document moved */
+ /* 301: Moved Permanently */
+ /* 302: Found */
+ /* 303: See Other */
+ /* 307: Temporary Redirect (HTTP/1.1) */
tpath = url_quote_conv(p, DocumentCharset);
request = NULL;
UFclose(&f);