Index: http-client.scm =================================================================== --- http-client.scm (revision 13405) +++ http-client.scm (working copy) @@ -259,9 +259,13 @@ (make-property-condition 'net)))) ((and in out)) ((and (string? header) - (is-keep-alive? header a)) - (or (is-connected? id) (add-connection! id i o))) + (is-keep-alive? header a) ; server + (is-keep-alive? header as)) ; client + (unless (is-connected? id) + (add-connection! id i o))) (else + (when (is-connected? id) + (close-connection! id)) (set-finalizer! i close-input-port) (set-finalizer! o close-output-port) ) ) (values header a i o)))