nextcloud / news

:newspaper: RSS/Atom feed reader
https://apps.nextcloud.com/apps/news
GNU Affero General Public License v3.0
834 stars 179 forks source link

Fetching a feed times out #2482

Open a-mair opened 7 months ago

a-mair commented 7 months ago

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

Explain the Problem

What problem did you encounter? Fetching the feed https://fcbayern.com/de/api/rss/contentliste/news times out.

I guess the problem are the HTTP headers sent to the web server. I tried using '''openssl s_client -connect fcbayern.com:443'''. The minimum of required HTTP headers to receive to feed seems to be:

GET /de/api/rss/contentliste/news HTTP/1.1
Host: fcbayern.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Accept: application/rss+xml, application/rdf+xml;q=0.8, application/atom+xml;q=0.6, application/xml;q=0.4, text/xml;q=0.4, */*;q=0.2
Accept-Encoding: deflate, br

Even just swapping the two lines starting with "Accept" results in no results and a hanging connection:

GET /de/api/rss/contentliste/news HTTP/1.1
Host: fcbayern.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Accept-Encoding: deflate, br
Accept: application/rss+xml, application/rdf+xml;q=0.8, application/atom+xml;q=0.6, application/xml;q=0.4, text/xml;q=0.4, */*;q=0.2

What HTTP headers are used by the News app? How can I debug that?

Steps to Reproduce

Explain what you did to encounter the issue

  1. Add the feed https://fcbayern.com/de/api/rss/contentliste/news
  2. Update the feed: occ news:updater:update-feed USER FEED_ID
  3. "cURL error 28: Operation timed out after 60001 milliseconds with 0 bytes received ..."

System Information

Contents of nextcloud/data/nextcloud.log ```json {"reqId":"DgV5dVH2RiYCdVRFfoAa","level":1,"time":"2023-12-02T07:40:34+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"hitting https://fcbayern.com/de/api/rss/contentliste/news","userAgent":"--","version":"27.1.4.1","data":{"app":"news"}} {"reqId":"DgV5dVH2RiYCdVRFfoAa","level":2,"time":"2023-12-02T07:41:34+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"https://fcbayern.com/de/api/rss/contentliste/news readerror : cURL error 28: Operation timed out after 60002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://fcbayern.com/de/api/rss/contentliste/news","userAgent":"--","version":"27.1.4.1","data":{"app":"news"}} ```
Contents of Browser Error Console Didn't use browser.
Grotax commented 6 months ago

Hey there,

you can check this by using this website: https://webhook.site and adding the unique url as new feed. Of course that url does not have any feed but you can see what the first request looks like on your system