mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05:00
URL no longer escaped and unescaped during normalization (#324)
This commit is contained in:
parent
1d257f908a
commit
dba8cbf61b
@ -47,11 +47,6 @@ func normalizeURL(u string) (*url.URL, string) {
|
||||
// gemini://example.com -> gemini://example.com/
|
||||
if parsed.Path == "" {
|
||||
parsed.Path = "/"
|
||||
} else {
|
||||
// Decode and re-encode path
|
||||
// This removes needless encoding, like that of ASCII chars
|
||||
// And encodes anything that wasn't but should've been
|
||||
parsed.RawPath = strings.ReplaceAll(url.PathEscape(parsed.Path), "%2F", "/")
|
||||
}
|
||||
|
||||
// Do the same to the query string
|
||||
|
Loading…
Reference in New Issue
Block a user