1
0
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:
Andrew Gerrand 2010-09-22 16:25:26 +10:00
parent 22974fbe8e
commit d093bdbe7e

View File

@ -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