aboutsummaryrefslogtreecommitdiff
path: root/uri.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-02-19 20:17:37 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-02-19 20:17:37 +0200
commit58e4dea85db1b01e95b02e105b2a0e953c52694a (patch)
tree4343ca86ceeb660a37d9d7fc7f01aff1679e5b6c /uri.go
parentAllow updating request's RequestURI and Host header via Request.URI() (diff)
downloadfasthttp-58e4dea85db1b01e95b02e105b2a0e953c52694a.tar.gz
fasthttp-58e4dea85db1b01e95b02e105b2a0e953c52694a.tar.bz2
fasthttp-58e4dea85db1b01e95b02e105b2a0e953c52694a.zip
Properly copy query arguments in URI.CopyTo
Diffstat (limited to 'uri.go')
-rw-r--r--uri.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/uri.go b/uri.go
index 49b30a9..a0e2744 100644
--- a/uri.go
+++ b/uri.go
@@ -62,7 +62,8 @@ func (u *URI) CopyTo(dst *URI) {
dst.hash = append(dst.hash[:0], u.hash...)
dst.host = append(dst.host[:0], u.host...)
- dst.parsedQueryArgs = false
+ u.queryArgs.CopyTo(&dst.queryArgs)
+ dst.parsedQueryArgs = u.parsedQueryArgs
// fullURI and requestURI shouldn't be copied, since they are created
// from scratch on each FullURI() and RequestURI() call.