diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2022-02-28 11:56:59 +0100 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2022-02-28 11:56:59 +0100 |
commit | 6b5bc7bb304975147b4af68df54ac214ed2554c1 (patch) | |
tree | 1f6b828e42e3b3defcdbcd5f54d8fe3e9b48b34c /strings.go | |
parent | Don't log ErrBadTrailer by default (diff) | |
download | fasthttp-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.go | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -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") |