]> Cypherpunks repositories - gostls13.git/commit
http: allow handlers to send non-chunked responses
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 3 Mar 2011 20:22:13 +0000 (12:22 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 3 Mar 2011 20:22:13 +0000 (12:22 -0800)
commit61fd11ef9658a214eb9c46ca2bd84aef7a994819
tree830f5b863030ef5dfaf906619de68a8dea85cfaa
parent9ebe384b71c8abffd64c50aa619fc4e4b9163261
http: allow handlers to send non-chunked responses

Currently all http handlers reply to HTTP/1.1 requests with
chunked responses.  This patch allows handlers to opt-out of
that behavior by pre-declaring their Content-Length (which is
then enforced) and unsetting their Transfer-Encoding or
setting it to the "identity" encoding.

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4245058
src/pkg/http/serve_test.go
src/pkg/http/server.go