diff options
| author | codesoap <codesoap@mailbox.org> | 2024-02-08 22:18:27 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-02-12 14:35:18 +0000 |
| commit | 2b58355ef624239dbe32185dc8dfc9d1074615c6 (patch) | |
| tree | 37ca8846a240029ad8d146bb618e865c6c8dff0d /src/net/http/server.go | |
| parent | 628b1015b972eabcc0a678ab69a74601239c40a4 (diff) | |
| download | go-2b58355ef624239dbe32185dc8dfc9d1074615c6.tar.xz | |
net/http: remove superfluous newline on redirects
Change-Id: I30d3ae9d540f9cc85ea5a6875ee8884d3e646d6f
GitHub-Last-Rev: 29cabdcb3a8746ef51953617f4ec47deac3608da
GitHub-Pull-Request: golang/go#65623
Reviewed-on: https://go-review.googlesource.com/c/go/+/562356
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/net/http/server.go')
| -rw-r--r-- | src/net/http/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go index acac78bcd0..d42fdc6322 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -2273,7 +2273,7 @@ func Redirect(w ResponseWriter, r *Request, url string, code int) { // Shouldn't send the body for POST or HEAD; that leaves GET. if !hadCT && r.Method == "GET" { - body := "<a href=\"" + htmlEscape(url) + "\">" + StatusText(code) + "</a>.\n" + body := "<a href=\"" + htmlEscape(url) + "\">" + StatusText(code) + "</a>." fmt.Fprintln(w, body) } } |
