mirror of
https://github.com/golang/go.git
synced 2025-10-19 19:13:18 +00:00
net/http: add proper panic message
Change-Id: Ibfb330eaf24e004ddec60a5ca08cdc780235ad8c Reviewed-on: https://go-review.googlesource.com/c/go/+/688315 Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Mark Freeman <mark@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
46b5839231
commit
10c5cf68d4
1 changed files with 1 additions and 1 deletions
|
@ -1614,7 +1614,7 @@ func writeStatusLine(bw *bufio.Writer, is11 bool, code int, scratch []byte) {
|
|||
// It's illegal to call this before the header has been flushed.
|
||||
func (w *response) bodyAllowed() bool {
|
||||
if !w.wroteHeader {
|
||||
panic("")
|
||||
panic("net/http: bodyAllowed called before the header was written")
|
||||
}
|
||||
return bodyAllowedForStatus(w.status)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue