mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
wrap in charset
This commit is contained in:
parent
b40fe94147
commit
80402943a1
@ -36,7 +36,12 @@ func DiscoverFeed(candidateUrl string) (*DiscoverResult, error) {
|
||||
if res.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("status code %d", res.StatusCode)
|
||||
}
|
||||
content, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
body, err := charset.NewReader(res.Body, res.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
content, err := ioutil.ReadAll(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user