From: Lars Magne Ingebrigtsen Date: Sat, 16 Apr 2011 13:59:54 +0000 (+0200) Subject: (url-http-wait-for-headers-change-function): Protect against malformed headerless... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~271 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10472dd0d62d986e048c01a3d37627b843a321d2;p=emacs.git (url-http-wait-for-headers-change-function): Protect against malformed headerless responses from servers. --- 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 @@ +2011-04-16 Lars Magne Ingebrigtsen + + * url-http.el (url-http-wait-for-headers-change-function): Protect + against malformed headerless responses from servers. + 2011-04-02 Chong Yidong * 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." (downcase url-http-transfer-encoding))) (cond + ((null url-http-response-status) + ;; We got back a headerless malformed response from the + ;; server. + (url-http-activate-callback)) ((or (= url-http-response-status 204) (= url-http-response-status 205)) (url-http-debug "%d response must have headers only (%s)."