]> Cypherpunks repositories - gostls13.git/commit
net/http: zero pad Response status codes to three digits
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 29 Jan 2016 18:26:06 +0000 (18:26 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 5 Apr 2016 05:57:00 +0000 (05:57 +0000)
commit3bbede0c512ca645fa19522480c0200ee4711bf3
tree1861d0547c38d1fb080eaf4568824bb0be6002fc
parent7208a2cd785fee77d951ad575adc705a3a012486
net/http: zero pad Response status codes to three digits

Go 1.6's HTTP/1.x Transport started enforcing that responses have 3
status digits, per the spec, but we could still write out invalid
status codes ourselves if the called
ResponseWriter.WriteHeader(0). That is bogus anyway, since the minimum
status code is 1xx, but be a little bit less bogus (and consistent)
and zero pad our responses.

Change-Id: I6883901fd95073cb72f6b74035cabf1a79c35e1c
Reviewed-on: https://go-review.googlesource.com/19130
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/net/http/clientserver_test.go
src/net/http/response.go
src/net/http/responsewrite_test.go
src/net/http/server.go