mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Remove RequestURI() hack
I can't remember why this change was done. Let's use only the standard lib. But it seems to break URL like this one: https://www.deimeke.net/dirk/blog/index.php?/feeds/index.rss2
This commit is contained in:
parent
fcd18f0b9c
commit
612f9cdbc8
3 changed files with 2 additions and 77 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
"miniflux.app/errors"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/timer"
|
||||
url_helper "miniflux.app/url"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -40,7 +39,6 @@ var (
|
|||
type Client struct {
|
||||
inputURL string
|
||||
|
||||
requestURL string
|
||||
requestEtagHeader string
|
||||
requestLastModifiedHeader string
|
||||
requestAuthorizationHeader string
|
||||
|
@ -90,9 +88,8 @@ func (c *Client) String() string {
|
|||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
`InputURL=%q RequestURL=%q ETag=%s LastMod=%s Auth=%v UserAgent=%q Verify=%v`,
|
||||
`InputURL=%q ETag=%s LastMod=%s Auth=%v UserAgent=%q Verify=%v`,
|
||||
c.inputURL,
|
||||
c.requestURL,
|
||||
etagHeader,
|
||||
lastModifiedHeader,
|
||||
c.requestAuthorizationHeader != "" || (c.requestUsername != "" && c.requestPassword != ""),
|
||||
|
@ -263,8 +260,7 @@ func (c *Client) executeRequest(request *http.Request) (*Response, error) {
|
|||
}
|
||||
|
||||
func (c *Client) buildRequest(method string, body io.Reader) (*http.Request, error) {
|
||||
c.requestURL = url_helper.RequestURI(c.inputURL)
|
||||
request, err := http.NewRequest(method, c.requestURL, body)
|
||||
request, err := http.NewRequest(method, c.inputURL, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue