aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-10-08 14:51:33 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-10-08 14:51:33 +0000
commitcaa996c6a100157707b28c1a3ff9455001ea0384 (patch)
tree3ab5cd6cb65d6ab64d526cbdd2af49a5b0fd52de /file.c
parentfix build error --disbable-m17n (diff)
downloadw3m-caa996c6a100157707b28c1a3ff9455001ea0384.tar.gz
w3m-caa996c6a100157707b28c1a3ff9455001ea0384.zip
[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 (limited to '')
-rw-r--r--file.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/file.c b/file.c
index 57732f2..da38706 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.230 2003/10/05 18:52:51 ukai Exp $ */
+/* $Id: file.c,v 1.231 2003/10/08 14:51:34 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -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);