]> Cypherpunks repositories - gostls13.git/commit
net/http/httptest: panic on non-3 digit (XXX) status code in Recorder.WriteHeader
authorian woolf <btw515wolf2@gmail.com>
Sat, 10 Apr 2021 07:41:13 +0000 (15:41 +0800)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Wed, 14 Apr 2021 21:58:06 +0000 (21:58 +0000)
commitc3931ab1b7bceddc56479d7ddbd7517d244bfe17
tree9e3972cd8ddf2ff478f07f1647f8ccf1bb8f3ee9
parentcbf9caaf22da04805f1e07277860324c7d9052b6
net/http/httptest: panic on non-3 digit (XXX) status code in Recorder.WriteHeader

This change conforms Recorder with net/http servers, to panic
when a handler writes a non-3 digit XXX status code.

Fixes #45353

Change-Id: Id5ed4af652e8c150ae86bf50402b800d935e2203
Reviewed-on: https://go-review.googlesource.com/c/go/+/308950
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
src/net/http/httptest/recorder.go
src/net/http/httptest/recorder_test.go