From: Shun-ichi GOTO <gotoh@taiyo.co.jp>
Subject: url-http: bug of mis-judgement as http 0.9
Date: Mon, 13 Nov 2006 16:55:11 +0900 [thread overview]
Message-ID: <uirhj6asg.wl%gotoh@taiyo.co.jp> (raw)
I've encountered a strange error in the process filter and it also said
"HTTP/0.9 How I hate thee!" although my server is not 0.9.
I found a bug of mis-detecting of a version (1.0, 1.1 or 0.9) of response.
This bug appears on the first call of the process filter with a
string data which does not have complete line (it means without \n).
In my case, process filter was called with string data: "HTTP/1.".
Therfore url-http-wait-for-headers-change-function<f> judged
the response is not http 1.0/1.1 before first line is completed.
Here is a example patch to fix this.
Index: url-http.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-http.el,v
retrieving revision 1.41
diff -u -r1.41 url-http.el
--- url-http.el 10 Nov 2006 17:09:01 -0000 1.41
+++ url-http.el 13 Nov 2006 07:32:11 -0000
@@ -933,7 +933,8 @@
(old-http nil)
(content-length nil))
(goto-char (point-min))
- (if (not (looking-at "^HTTP/[1-9]\\.[0-9]"))
+ (if (and (looking-at ".*\n") ; have one line at least
+ (not (looking-at "^HTTP/[1-9]\\.[0-9]")))
;; Not HTTP/x.y data, must be 0.9
;; God, I wish this could die.
(setq end-of-headers t
--- Regards,
Shun-ichi Goto <gotoh@taiyo.co.jp>
R&D Group, TAIYO Corp., Tokyo, JAPAN
next reply other threads:[~2006-11-13 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 7:55 Shun-ichi GOTO [this message]
2006-11-15 23:09 ` url-http: bug of mis-judgement as http 0.9 Magnus Henoch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uirhj6asg.wl%gotoh@taiyo.co.jp \
--to=gotoh@taiyo.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.