mirror of
https://github.com/miniflux/v2.git
synced 2025-09-05 18:41:01 +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:
parent
200b1c304b
commit
3debf75eb9
8 changed files with 128 additions and 26 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
errUnreadableDoc = "Unable to analyze this page: %v"
|
||||
errUnreadableDoc = "Unable to analyze this page: %v"
|
||||
)
|
||||
|
||||
// FindSubscriptions downloads and try to find one or more subscriptions from an URL.
|
||||
|
@ -31,7 +31,7 @@ func FindSubscriptions(websiteURL, userAgent, username, password string) (Subscr
|
|||
return nil, err
|
||||
}
|
||||
|
||||
body := response.String()
|
||||
body := response.BodyAsString()
|
||||
if format := parser.DetectFeedFormat(body); format != parser.FormatUnknown {
|
||||
var subscriptions Subscriptions
|
||||
subscriptions = append(subscriptions, &Subscription{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue