mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
21 lines
451 B
Go
21 lines
451 B
Go
package fasthttp
|
|
|
|
import "testing"
|
|
|
|
func TestURIPathNormalizeIssue86(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
// see https://github.com/valyala/fasthttp/issues/86
|
|
var u URI
|
|
|
|
testURIPathNormalize(t, &u, `C:\a\b\c\fs.go`, `C:\a\b\c\fs.go`)
|
|
|
|
testURIPathNormalize(t, &u, `a`, `/a`)
|
|
|
|
testURIPathNormalize(t, &u, "/../../../../../foo", "/foo")
|
|
|
|
testURIPathNormalize(t, &u, "/..\\..\\..\\..\\..\\", "/")
|
|
|
|
testURIPathNormalize(t, &u, "/..%5c..%5cfoo", "/foo")
|
|
}
|