joyent/node — pull request #4647 by bnoordhuis (2013-01-23 00:50:49+00:00)
Title: http: close connection on 304 and chunked encoding

Force the connection to close when the response is a 304 Not Modified
and the user has set a "Transfer-Encoding: chunked" header.

RFC 2616 mandates that 304 responses MUST NOT have a body but node.js
used to send out a zero chunk anyway to accommodate clients that don't
have special handling for 304 responses.

It was pointed out that this might confuse reverse proxies to the point
of creating security liabilities, so suppress the zero chunk and force
the connection to close.

Suggested reviewers: @isaacs @pquerna