Etuldan / spaRSS

Based on Flym and Sparse RSS, this checks RSS/Atom news feeds, polling for updates from the device on a regular basis. Fetched items are available for offline reading.
Other
142 stars 31 forks source link

Scheme-relative URL not supported #155

Open VeryTastyTomato opened 8 years ago

VeryTastyTomato commented 8 years ago

Hello,

I have some trouble with a particular Atom feed: http://www.bortzmeyer.org/feed.atom

When I want to go visit the web page of a post, the URL gave to the browser (Firefox Mobile in my case) is wrong and is like this:

http://www.bortmeyer.org//www.bortzmeyer.org/7735.html

instead of:

http://www.bortzmeyer.org/7735.html

Since it happens only with this feed, I talked about it to the owner of the website. It turns out that he uses the protocole relative URL in order to support both HTTP and HTTPS protocol in one feed, but it seems that spaRSS doesn't work well with it.

Here some links for more information:

http://stackoverflow.com/questions/9646407/two-forward-slashes-in-a-url-src-href-attribute/9646435#9646435

http://webtips.dan.info/url.html (use CTRL-F to search: “In an uncommon but legal URL form”)

http://www.paulirish.com/2010/the-protocol-relative-url/ (with a note for a security issue with this method, but I think it doesn’t concern spaRSS; it’s more directed to websites administrators).

Etuldan commented 8 years ago

I'm not able to reproduce, while I'm pretty sure the issue can occur.

To be clear, about the steps to reproduce: Open spaRSS Open the news with this title "RFC 7735: Tracking Reviews of Documents". Touch on a link in the article (if yes, which one?) or Open the menu "View in browser" ?

VeryTastyTomato commented 8 years ago

Hi @Etuldan.

In fact, the webmaster of the site investigated about this issue, and he realized that many feed agregators didn’t work well with scheme-relative URL. Moreover it seems that the RFC describing the latter isn’t really accurate.

Therefore he decided to not use this way for his feeds, and he offers 2 feeds in HTTP and 2 feeds in HTTPS. So I think the issue isn’t reproductible anymore with these particular feeds. Before that, opening the menu “View in browser” was indeed a way to have this error.

I think you should still try to resolve this issue if it doesn’t need too much work, but it seems that these kinds of URL aren’t used by many people.

Here is the article in which he explained this issue more thoroughly (in French):

http://www.bortzmeyer.org/deux-flux-syndication.html

After some research, I found more links about protocol-relative URL (or more accurately scheme-relative URL):

http://www.rssboard.org/rss-profile In this link, it is said that

publishers of RSS document MUST NOT assume that all schemes are available.

(search “relative” on the page to get straight to the section).

However it seems to only concern RSS feeds, because about Atom’s ones I found this:

http://www.atomenabled.org/developers/protocol/#aboutThisDocument

xml:base may be used to control how relative URIs are resolved

I don’t know if it’s relevant though.