aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2011-04-16 15:59:54 +0200
committerLars Magne Ingebrigtsen2011-04-16 15:59:54 +0200
commit10472dd0d62d986e048c01a3d37627b843a321d2 (patch)
treec3a60f7f115c89fad6442280d303b6cae3d2a116
parentcf8b0c278be93e9584cf91315b2f11fc88da37a9 (diff)
downloademacs-10472dd0d62d986e048c01a3d37627b843a321d2.tar.gz
emacs-10472dd0d62d986e048c01a3d37627b843a321d2.zip
(url-http-wait-for-headers-change-function): Protect against malformed headerless responses from servers.
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-http.el4
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index f75a3444e0c..528b63a6448 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12011-04-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * url-http.el (url-http-wait-for-headers-change-function): Protect
4 against malformed headerless responses from servers.
5
12011-04-02 Chong Yidong <cyd@stupidchicken.com> 62011-04-02 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * url-gw.el (url-open-stream): Use new open-network-stream 8 * url-gw.el (url-open-stream): Use new open-network-stream
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 07e57cf3301..28071e7165a 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1077,6 +1077,10 @@ the end of the document."
1077 (downcase url-http-transfer-encoding))) 1077 (downcase url-http-transfer-encoding)))
1078 1078
1079 (cond 1079 (cond
1080 ((null url-http-response-status)
1081 ;; We got back a headerless malformed response from the
1082 ;; server.
1083 (url-http-activate-callback))
1080 ((or (= url-http-response-status 204) 1084 ((or (= url-http-response-status 204)
1081 (= url-http-response-status 205)) 1085 (= url-http-response-status 205))
1082 (url-http-debug "%d response must have headers only (%s)." 1086 (url-http-debug "%d response must have headers only (%s)."