mirror of
https://github.com/golang/go
synced 2024-11-11 23:40:22 -07:00
net/http: note missing minor version is invalid
This commit is contained in:
parent
6bdab832a4
commit
5f7663ac4a
@ -764,7 +764,8 @@ func removeZone(host string) string {
|
||||
}
|
||||
|
||||
// ParseHTTPVersion parses an HTTP version string.
|
||||
// "HTTP/1.0" returns (1, 0, true). Note that "HTTP/2" is not valid.
|
||||
// "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…
Reference in New Issue
Block a user