]> Cypherpunks repositories - gostls13.git/commitdiff
http: escape _all_ reserved characters as per the RFC
authorAndrew Gerrand <adg@golang.org>
Wed, 22 Sep 2010 06:25:26 +0000 (16:25 +1000)
committerAndrew Gerrand <adg@golang.org>
Wed, 22 Sep 2010 06:25:26 +0000 (16:25 +1000)
R=r
CC=golang-dev
https://golang.org/cl/2199043

src/pkg/http/url.go

index 136e6dfe4ba0e3aeaa381e9302890480818f1a83..060619b8355ec5aef2290a553a57a01dac40b7fa 100644 (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