edicl / hunchentoot

Web server written in Common Lisp
https://edicl.github.io/hunchentoot/
698 stars 123 forks source link

Fix forced "Connection: Close" outgoing HTTP header #67

Closed AndrejSuc closed 10 years ago

AndrejSuc commented 10 years ago

Hello everyone, I'm new here and am in the process of updating Hunchensocket to adhere to the Websocket protocol ver. 13 RFC 6455.

I've come with a problem and a proposed solution (not my own), and I'd like it verified for backwards-compatibility, before it gets committed. Here it is, in file 'headers.lisp' on line 113 (as of 21.12.2013), replace:

(t (setf (header-out :connection) "Close")) ))

with:

(t (unless (header-out-set-p :connection) (setf (header-out :connection) "Close"))) ))

Best regards,

Andrej

hanshuebner commented 10 years ago

Andrej,

I think your proposed change makes sense. Please submit a pull request.

-Hans

2013/12/21 AndrejSuc notifications@github.com

Hello everyone, I'm new here and am in the process of updating Hunchensocket to adhere to the Websocket protocol ver. 13 RFC 6455http://tools.ietf.org/html/rfc6455#section-1.3 .

I've come with a problem and a proposed solution (not my own), and I'd like it verified for backwards-compatibility, before it gets committed. Here it is, in file 'headers.lisp' on line 113 (as of 21.12.2013), replace:

(t (setf (header-out :connection) "Close")) ))

with:

(t (unless (header-out-set-p :connection) (setf (header-out :connection) "Close"))) ))

Best regards,

Andrej

— Reply to this email directly or view it on GitHubhttps://github.com/edicl/hunchentoot/issues/67 .