diff --git a/module/web/client.scm b/module/web/client.scm index 6aedb751e..d3502cc52 100644 --- a/module/web/client.scm +++ b/module/web/client.scm @@ -129,8 +129,6 @@ Otherwise it will be returned as a bytevector." extra-headers))))) (write-request req port) (force-output port) - (if (not keep-alive?) - (shutdown port 1)) (let* ((res (read-response port)) (body (read-response-body res))) (if (not keep-alive?) diff --git a/module/web/http.scm b/module/web/http.scm index 216fddd3e..976f0fb9e 100644 --- a/module/web/http.scm +++ b/module/web/http.scm @@ -1,6 +1,6 @@ ;;; HTTP messages -;; Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -1307,9 +1307,19 @@ treated specially, and is just returned as a plain string." ;; Connection = "Connection" ":" 1#(connection-token) ;; connection-token = token ;; e.g. -;; Connection: close, foo-header +;; Connection: close, Foo-Header ;; -(declare-header-list-header! "Connection") +(declare-header! "Connection" + split-header-names + list-of-header-names? + (lambda (val port) + (write-list val port + (lambda (x port) + (display (if (eq? x 'close) + "close" + (header->string x)) + port)) + ", "))) ;; Date = "Date" ":" HTTP-date ;; e.g.