diff options
| author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-04-17 02:32:13 +0000 | 
|---|---|---|
| committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-04-17 02:32:13 +0000 | 
| commit | 576f325c86f171acef42500a356a22a88459e0b6 (patch) | |
| tree | 497d3ef2461d30280dee98aa9d474c270494515b | |
| parent | [w3m-dev 03169] Can't calculate table height if number of cells > 20. (diff) | |
| download | w3m-576f325c86f171acef42500a356a22a88459e0b6.tar.gz w3m-576f325c86f171acef42500a356a22a88459e0b6.zip | |
[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>
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | file.c | 4 | 
2 files changed, 9 insertions, 2 deletions
| @@ -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. @@ -3340,4 +3345,4 @@  	* release-0-2-1  	* import w3m-0.2.1 -$Id: ChangeLog,v 1.369 2002/04/09 14:53:54 ukai Exp $ +$Id: ChangeLog,v 1.370 2002/04/17 02:32:13 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.89 2002/04/09 14:45:58 ukai Exp $ */ +/* $Id: file.c,v 1.90 2002/04/17 02:32:13 ukai Exp $ */  #include "fm.h"  #include <sys/types.h>  #include "myctype.h" @@ -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 | 
