mirror of
https://github.com/golang/go
synced 2024-11-24 20:20:03 -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 {
|
||||
case '<', '>', '#', '%', '"', // RFC 2396 delims
|
||||
'{', '}', '|', '\\', '^', '[', ']', '`', // RFC2396 unwise
|
||||
'?', '&', '=', '+': // RFC 2396 reserved in path
|
||||
';', '/', '?', ':', '@', '&', '=', '+', '$', ',': // RFC 2396 reserved
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user