[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Content-Type ignored if 404 Not Found
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Fri, 30 Sep 2011 13:53:30 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11647
- References: <878vp67pwp.fsf@xxxxxxxxxxx>
In [emacs-w3m : No.11646] jidanni@xxxxxxxxxxx wrote:
(B> Images like
(B> $ HEAD http://i.ytimg.com/vi/zzzzzz/hq3.jpg
(B> 404 Not Found
(B> Content-Type: image/jpeg
(B> Cannot be viewed properly, as their Content-Type gets ignored due to
(B> being 404.
(B> They cannot be viewed properly alone, or embedded in other pages.
(B> emacs-w3m-version "1.4.442"
(BWell, I'm not quite sure of it but decoding such contents might
(Bbe worth trying. The attached patch doesn't seem to make emacs-w3m
(Bcause any harm, at least for hq3.jpg and non-existent urls. Anyone?
--- w3m.el~ 2011-09-07 23:15:48.000000000 +0000
(B+++ w3m.el 2011-09-30 04:52:09.406250000 +0000
(B@@ -5545,7 +5545,7 @@
(B ((eq attr 'redirection-exceeded)
(B ((or (not (string-match "\\`https?:" url))
(B- (memq (car attr) '(200 300)))
(B+ (memq (car attr) '(200 300 404)))
(B (if (or no-uncompress
(B (w3m-decode-encoded-contents (nth 4 attr)))
(B (let ((temp-buffer (current-buffer)))