mirror of
https://github.com/golang/go
synced 2024-11-22 04:14:42 -07:00
http: escape _all_ reserved characters as per the RFC
R=r CC=golang-dev https://golang.org/cl/2199043
This commit is contained in:
parent
22974fbe8e
commit
d093bdbe7e
@ -61,7 +61,7 @@ func shouldEscape(c byte) bool {
|
|||||||
switch c {
|
switch c {
|
||||||
case '<', '>', '#', '%', '"', // RFC 2396 delims
|
case '<', '>', '#', '%', '"', // RFC 2396 delims
|
||||||
'{', '}', '|', '\\', '^', '[', ']', '`', // RFC2396 unwise
|
'{', '}', '|', '\\', '^', '[', ']', '`', // RFC2396 unwise
|
||||||
'?', '&', '=', '+': // RFC 2396 reserved in path
|
';', '/', '?', ':', '@', '&', '=', '+', '$', ',': // RFC 2396 reserved
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user