aboutsummaryrefslogtreecommitdiff
path: root/strings.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-02-28 11:56:59 +0100
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-02-28 11:56:59 +0100
commit6b5bc7bb304975147b4af68df54ac214ed2554c1 (patch)
tree1f6b828e42e3b3defcdbcd5f54d8fe3e9b48b34c /strings.go
parentDon't log ErrBadTrailer by default (diff)
downloadfasthttp-6b5bc7bb304975147b4af68df54ac214ed2554c1.tar.gz
fasthttp-6b5bc7bb304975147b4af68df54ac214ed2554c1.tar.bz2
fasthttp-6b5bc7bb304975147b4af68df54ac214ed2554c1.zip
Add windows support to normalizePath
This is probably still not 100% sure and there are still many bugs with FS on windows. But it's a slight improvement. Fixes #1226
Diffstat (limited to 'strings.go')
-rw-r--r--strings.go34
1 files changed, 19 insertions, 15 deletions
diff --git a/strings.go b/strings.go
index e4fb08b..370e307 100644
--- a/strings.go
+++ b/strings.go
@@ -7,21 +7,25 @@ var (
)
var (
- strSlash = []byte("/")
- strSlashSlash = []byte("//")
- strSlashDotDot = []byte("/..")
- strSlashDotSlash = []byte("/./")
- strSlashDotDotSlash = []byte("/../")
- strCRLF = []byte("\r\n")
- strHTTP = []byte("http")
- strHTTPS = []byte("https")
- strHTTP10 = []byte("HTTP/1.0")
- strHTTP11 = []byte("HTTP/1.1")
- strColon = []byte(":")
- strColonSlashSlash = []byte("://")
- strColonSpace = []byte(": ")
- strCommaSpace = []byte(", ")
- strGMT = []byte("GMT")
+ strSlash = []byte("/")
+ strSlashSlash = []byte("//")
+ strSlashDotDot = []byte("/..")
+ strSlashDotSlash = []byte("/./")
+ strSlashDotDotSlash = []byte("/../")
+ strBackSlashDotDot = []byte(`\..`)
+ strBackSlashDotBackSlash = []byte(`\.\`)
+ strSlashDotDotBackSlash = []byte(`/..\`)
+ strBackSlashDotDotBackSlash = []byte(`\..\`)
+ strCRLF = []byte("\r\n")
+ strHTTP = []byte("http")
+ strHTTPS = []byte("https")
+ strHTTP10 = []byte("HTTP/1.0")
+ strHTTP11 = []byte("HTTP/1.1")
+ strColon = []byte(":")
+ strColonSlashSlash = []byte("://")
+ strColonSpace = []byte(": ")
+ strCommaSpace = []byte(", ")
+ strGMT = []byte("GMT")
strResponseContinue = []byte("HTTP/1.1 100 Continue\r\n\r\n")