aboutsummaryrefslogtreecommitdiff
path: root/uri.go
diff options
context:
space:
mode:
authorGravatar Aleksandr Razumov <ar@cydev.ru> 2016-05-04 10:07:11 +0300
committerGravatar Aleksandr Razumov <ar@cydev.ru> 2016-05-04 10:07:11 +0300
commit5e1bdcae2d7909e455675a34a157119a30765672 (patch)
tree3fd32ad5f3e5c9fa8d64bb8622637adcb948cf50 /uri.go
parentIssue #83: Added ResponseHeader.DelClientCookie for instructing the client fo... (diff)
downloadfasthttp-5e1bdcae2d7909e455675a34a157119a30765672.tar.gz
fasthttp-5e1bdcae2d7909e455675a34a157119a30765672.tar.bz2
fasthttp-5e1bdcae2d7909e455675a34a157119a30765672.zip
Issue #86: Fixed leading slash on Windows
Diffstat (limited to 'uri.go')
-rw-r--r--uri.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/uri.go b/uri.go
index 464ccd7..6249f44 100644
--- a/uri.go
+++ b/uri.go
@@ -268,12 +268,7 @@ func (u *URI) parse(host, uri []byte, h *RequestHeader) {
func normalizePath(dst, src []byte) []byte {
dst = dst[:0]
-
- // add leading slash
- if len(src) == 0 || src[0] != '/' {
- dst = append(dst, '/')
- }
-
+ dst = addLeadingSlash(dst, src)
dst = decodeArgAppend(dst, src, false)
// remove duplicate slashes