1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Normalize URL query string before executing HTTP requests

- Make sure query strings parameters are encoded
- As opposed to the standard library, do not append equal sign
for query parameters with empty value
- Strip URL fragments like Web browsers
This commit is contained in:
Frédéric Guillot 2019-12-26 15:26:23 -08:00
parent 200b1c304b
commit 3debf75eb9
8 changed files with 128 additions and 26 deletions

View file

@ -191,7 +191,7 @@ func TestDifferentEncodingWithResponse(t *testing.T) {
t.Fatalf(`Encoding error for %q: %v`, tc.filename, encodingErr)
}
feed, parseErr := ParseFeed(r.String())
feed, parseErr := ParseFeed(r.BodyAsString())
if parseErr != nil {
t.Fatalf(`Parsing error for %q - %q: %v`, tc.filename, tc.contentType, parseErr)
}