aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/subscription
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-12-26 15:26:23 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-12-26 15:56:59 -0800
commit3debf75eb9229144a05701e03ba59408a75dd815 (patch)
tree9e9eb6569db3234b514f798d4278b20793b79833 /reader/subscription
parent200b1c304b999191a29f36d4122e7aa05481125c (diff)
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
Diffstat (limited to 'reader/subscription')
-rw-r--r--reader/subscription/finder.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/reader/subscription/finder.go b/reader/subscription/finder.go
index fab8d93..66bbedd 100644
--- a/reader/subscription/finder.go
+++ b/reader/subscription/finder.go
@@ -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{