aboutsummaryrefslogtreecommitdiff
path: root/uri_test.go
diff options
context:
space:
mode:
authorGravatar Kristoffer Peterhänsel <kristoffer@printix.net> 2016-02-09 14:17:56 +0100
committerGravatar Kristoffer Peterhänsel <kristoffer@printix.net> 2016-02-09 14:17:56 +0100
commit2e947c76e1f9e1adfbdfd4b5b9346756b5839d5c (patch)
tree3a7987e53d7ab6f58aac0ff64a8bcead48dded59 /uri_test.go
parentIssue #46: use zlib instead of flate for deflate Content-Encoding (diff)
downloadfasthttp-2e947c76e1f9e1adfbdfd4b5b9346756b5839d5c.tar.gz
fasthttp-2e947c76e1f9e1adfbdfd4b5b9346756b5839d5c.tar.bz2
fasthttp-2e947c76e1f9e1adfbdfd4b5b9346756b5839d5c.zip
Fix fragment parsing so it won't get url encoded if there is no query in front of it
Diffstat (limited to 'uri_test.go')
-rw-r--r--uri_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/uri_test.go b/uri_test.go
index 71191cd..5cbab28 100644
--- a/uri_test.go
+++ b/uri_test.go
@@ -52,6 +52,7 @@ func TestURIUpdate(t *testing.T) {
testURIUpdate(t, "http://xx/a/b/c/d", "../qwe/p?zx=34", "http://xx/a/b/qwe/p?zx=34")
testURIUpdate(t, "https://qqq/aaa.html?foo=bar", "?baz=434&aaa", "https://qqq/aaa.html?baz=434&aaa")
testURIUpdate(t, "http://foo.bar/baz", "~a/%20b=c,тест?йцу=ке", "http://foo.bar/~a/%20b=c,%D1%82%D0%B5%D1%81%D1%82?йцу=ке")
+ testURIUpdate(t, "http://foo.bar/baz", "/qwe#fragment", "http://foo.bar/qwe#fragment")
}
func testURIUpdate(t *testing.T, base, update, result string) {