URL no longer escaped and unescaped during normalization (#324)

This commit is contained in:
Autumn! 2022-10-13 00:58:31 +01:00 committed by GitHub
parent 1d257f908a
commit dba8cbf61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -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