news icon indicating copy to clipboard operation
news copied to clipboard

RSS feed incorrectly identified as HTML?

Open glacambre opened this issue 1 year ago • 2 comments

Checklist

  • [x] I am using the latest version
  • [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.
  • [x] This issue contains only one bug. I will open one issue for every bug report I want to file.

Steps to reproduce the bug

Import the following OPML file:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
  <head>
    <title>
      Feeder
    </title>
  </head>
  <body>
    <outline title="Speeds and Feeds" text="Speeds and Feeds" type="rss" xmlUrl="http://veridicalsystems.com/blog/feed/"/>
  </body>
</opml>

Actual behavior

News emits an error about not being able find feed links in the HTML page, despite the document's content being regular RSS XML AFAICS.

Expected behavior

The feed is correctly imported. I tried to figure out why this feed would be identifier as HTML but couldn't find a reason. Perhaps it's because the HTTP response headers do not contain a content type? Firefox seems to identify the file as HTML too when performing right click -> save link as.

Device info

  • Android version/Custom ROM version: Stock android 13.
  • Device model: Pixel 4A.

glacambre avatar Oct 17 '22 11:10 glacambre

Seems to be valid: https://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fveridicalsystems.com%2Fblog%2Ffeed%2F

bubelov avatar Oct 17 '22 13:10 bubelov

Content type seems to be wrong though:

curl -sv http://veridicalsystems.com/blog/feed/ | grep Content-Type
*   Trying 192.30.252.153:80...
* Connected to veridicalsystems.com (192.30.252.153) port 80 (#0)
> GET /blog/feed/ HTTP/1.1
> Host: veridicalsystems.com
> User-Agent: curl/7.85.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Mon, 17 Oct 2022 13:25:20 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 83781
< Vary: Accept-Encoding
< Last-Modified: Thu, 28 Dec 2017 14:14:08 GMT
< Vary: Accept-Encoding
< Access-Control-Allow-Origin: *
< ETag: "5a44fc30-14745"
< expires: Mon, 17 Oct 2022 13:35:20 GMT
< Cache-Control: max-age=600
< Accept-Ranges: bytes
< x-proxy-cache: MISS
< X-GitHub-Request-Id: CF34:3210:13EB513:1AF252B:634D57C0
< 
{ [933 bytes data]
* Connection #0 to host veridicalsystems.com left intact

bubelov avatar Oct 17 '22 13:10 bubelov