mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net/http: note that "HTTP/2" is invalid for ParseHTTPVersion
Change-Id: Ieba05dea892ec9855a63b80e456bcf9188eef855
GitHub-Last-Rev: 5f7663ac4a
GitHub-Pull-Request: golang/go#41806
Reviewed-on: https://go-review.googlesource.com/c/go/+/259758
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Damien Neil <dneil@google.com>
This commit is contained in:
parent
a8a85281ca
commit
59e012991a
1 changed files with 2 additions and 1 deletions
|
|
@ -779,7 +779,8 @@ func removeZone(host string) string {
|
|||
}
|
||||
|
||||
// ParseHTTPVersion parses an HTTP version string.
|
||||
// "HTTP/1.0" returns (1, 0, true).
|
||||
// "HTTP/1.0" returns (1, 0, true). Note that strings without
|
||||
// a minor version, such as "HTTP/2", are not valid.
|
||||
func ParseHTTPVersion(vers string) (major, minor int, ok bool) {
|
||||
const Big = 1000000 // arbitrary upper bound
|
||||
switch vers {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue