commit 26b5ef4e74867198e883f0eb02416873321811be
parent 2ad6d4f263e00ab4883379efe7d7397231cf2ae6
Author: ukai <ukai>
Date: Wed, 17 Apr 2002 02:32:13 +0000
[w3m-dev 03176] no Content-Type in http response header
* file.c (loadGeneralFile): guess content-type from filename
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-17 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
+
+ * [w3m-dev 03176] no Content-Type in http response header
+ * file.c (loadGeneralFile): guess content-type from filename
+
2002-04-09 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03169] Can't calculate table height if number of cells > 20.
diff --git a/file.c b/file.c
@@ -1634,6 +1634,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
#endif
readHeader(&f, t_buf, FALSE, &pu);
t = checkContentType(t_buf);
+ if (t == NULL && pu.file != NULL)
+ t = guessContentType(pu.file);
if (t == NULL)
t = "text/plain";
if (http_response_code >= 301 && http_response_code <= 303