]> Cypherpunks repositories - gostls13.git/commit
net/http: do not allow space or slash in Host headers
authorJeff R. Allen <jra@nella.org>
Thu, 18 Jun 2015 10:37:26 +0000 (12:37 +0200)
committerRuss Cox <rsc@golang.org>
Wed, 15 Jul 2015 03:15:59 +0000 (03:15 +0000)
commit0c72eeb121702cc0a820976138cc01dd1a475895
tree6eeea0f1b5516140c3d80f4c8bf770b368d5473e
parente6a0c21e7d1970431c4b0e82acc9b0ec34dee29f
net/http: do not allow space or slash in Host headers

A malformed Host header can result in a malformed HTTP request.
Clean them to avoid this.

Updates #11206. We may come back and make this stricter for 1.6.

Change-Id: I23c7d821cd9dbf66c3c15d26750f305e3672d984
Reviewed-on: https://go-review.googlesource.com/11241
Reviewed-by: Russ Cox <rsc@golang.org>
src/net/http/http_test.go
src/net/http/request.go
src/net/http/request_test.go