• Brad Fitzpatrick's avatar
    net/http: zero pad Response status codes to three digits · 3bbede0c
    Brad Fitzpatrick authored
    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: 's avatarAndrew Gerrand <adg@golang.org>
    3bbede0c
responsewrite_test.go 6.52 KB