Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(463)

Unified Diff: src/pkg/net/url/url_test.go

Issue 31400043: code review 31400043: net/url: correctly escape URL as RFC 3986
Patch Set: diff -r 1140207a3395 https://code.google.com/p/go Created 11 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/net/url/url.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/net/url/url_test.go
===================================================================
--- a/src/pkg/net/url/url_test.go
+++ b/src/pkg/net/url/url_test.go
@@ -210,6 +210,15 @@
"http://jane:p%40ssword@google.com",
},
{
+ "http://foo%3Abar:~!%40%23$%25%5E&*()_+%7B%7D%7C%5B%5D%5C-=%60%3A;'%22%3C%3E%3F,.%2F@google.com",
+ &URL{
+ Scheme: "http",
+ User: UserPassword("foo:bar", "~!@#$%^&*()_+{}|[]\\-=`:;'\"<>?,./"),
+ Host: "google.com",
+ },
+ "",
+ },
+ {
"http://j@ne:password@google.com/p@th?q=@go",
&URL{
Scheme: "http",
@@ -872,6 +881,15 @@
},
"opaque?q=go+language",
},
+ // characters newly reserved in RFC 3986
+ {
+ &URL{
+ Scheme: "http",
+ Host: "example.com",
+ Path: "/[]!'()*/",
+ },
+ "/%5B%5D!'()*/",
+ },
}
func TestRequestURI(t *testing.T) {
« no previous file with comments | « src/pkg/net/url/url.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b