]> git.eshelyaron.com Git - emacs.git/commitdiff
(url-http-parse-headers): Don't reuse connection if "Connection: close" header
authorEli Zaretskii <eliz@gnu.org>
Fri, 5 May 2006 12:10:24 +0000 (12:10 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 5 May 2006 12:10:24 +0000 (12:10 +0000)
was seen.

lisp/url/url-http.el

index c401094593e42ecceb8d89bfb936e59f6408ac61..45bf97ec6b607711eaa9ca0221c166a74aa2cb80 100644 (file)
@@ -386,6 +386,10 @@ should be shown to the user."
   (url-http-parse-response)
   (mail-narrow-to-head)
   ;;(narrow-to-region (point-min) url-http-end-of-headers)
+  (let ((connection (mail-fetch-field "Connection")))
+    (if (and connection
+            (string= (downcase connection) "close"))
+       (delete-process url-http-process)))
   (let ((class nil)
        (success nil))
     (setq class (/ url-http-response-status 100))