changeset 70396:083f558fe283

(url-http-parse-headers): Don't reuse connection if "Connection: close" header was seen.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 05 May 2006 12:10:24 +0000
parents fd520a2e66ad
children a9473232a709
files lisp/url/url-http.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/url-http.el	Fri May 05 11:56:31 2006 +0000
+++ b/lisp/url/url-http.el	Fri May 05 12:10:24 2006 +0000
@@ -386,6 +386,10 @@
   (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))