mirror of
https://github.com/rancher/norman.git
synced 2025-09-13 22:01:34 +00:00
Use escaped path for url parsing
This commit is contained in:
@@ -46,7 +46,7 @@ type URLParser func(schema *types.Schemas, url *url.URL) (ParsedURL, error)
|
|||||||
func DefaultURLParser(schemas *types.Schemas, url *url.URL) (ParsedURL, error) {
|
func DefaultURLParser(schemas *types.Schemas, url *url.URL) (ParsedURL, error) {
|
||||||
result := ParsedURL{}
|
result := ParsedURL{}
|
||||||
|
|
||||||
path := url.Path
|
path := url.EscapedPath()
|
||||||
path = multiSlashRegexp.ReplaceAllString(path, "/")
|
path = multiSlashRegexp.ReplaceAllString(path, "/")
|
||||||
schemaVersion, version, prefix, parts, subContext := parseVersionAndSubContext(schemas, path)
|
schemaVersion, version, prefix, parts, subContext := parseVersionAndSubContext(schemas, path)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user