Closed Bug 458052 Opened 16 years ago Closed 10 years ago

use nsIFeedSniffer to help dispatch feed-like content (RSS links with proper MIME type are downloaded instead of opened)

Categories

(Camino Graveyard :: General, defect)

All
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gero1008, Unassigned)

References

(Depends on 1 open bug, )

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; de-de) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
Build Identifier: Version 1.6.4Int (1.8.1.17 2008091513)

(Correct) RSS links within the page initiate a download instead of RSS handling. The mime type "application/rss+xml" is given both in the link itself and in the HTTP headers of the linked document:

<a href="/aktuell/?rss" type="application/rss+xml">...</a>



Reproducible: Always

Steps to Reproduce:
1. Open http://www.dasauge.de/
2. Click one of the RSS icons within the page (e. g. in the "aktuell" box where it appears on hover). Do not use the address bar.

Actual Results:  
3. Camino will begin downloading

Expected Results:  
Camino should show the selection page for RSS targets (or whatever RSS prefs say).

The "link rel"-target with same targets and mimetypes within the HTML head (seen in the address bar) works. Firefox is not affected.
I'm not sure why XML Pretty-print isn't being triggered here, but the reason this works in Firefox and not in Camino is because Firefox uses a newer feed sniffing API.

I think we should confirm this, because AFAIK this is something that switching to nsIFeedSniffer will fix for us. Instead of downloading them, we should be:

  a) handing them off to the default reader with no download, or 
  b) opening them like we do if the MIME type is "text/xml"

I think for consistency's sake I'd personally prefer (b), coupled with a fix for bug 353097 so that it's easy to subscribe to the feed as desired.

cl
Hardware: Macintosh → All
Summary: RSS Mimetype in Links disregarded → RSS links with proper MIME type are downloaded instead of opened
(In reply to comment #1)
> I'm not sure why XML Pretty-print isn't being triggered here, but the reason
> this works in Firefox and not in Camino is because Firefox uses a newer feed
> sniffing API.

Ultimately, Gecko doesn't know anything special about application/rss+xml; it's just another content-type that Gecko doesn't handle internally (no different than application/pdf or application/rtf).

The reason pretty-print is not being invoked is because PP only works on text/xml and application/xml content-types, not application/foo+xml content-types (which Gecko doesn't know from Adam).  

The reason clicking works in Firefox and not Camino is that Firefox has a custom content-handler for application/rss+xml and application/atom+xml and other feed-like content-types.

It's not clear to me whether nsIFeedSniffer provides the content-handling bit, too, or if it just handles the actual guessing of whether something is a feed; Nick?

(FWIW, the page could probably make those links work correctly for all browsers by using feed: instead of http: as the protocol in those in-page links.)
Phil says this is exactly a dupe of bug 383535:

[This bug] is just a pure dupe of 383535 - that's what, and the only thing that, nsIFeedSniffer will do, sniff documents that are starting to load and if the document is a feed, change the content type into application/vnd.mozilla.maybe.feed which you will have registered a handler for, and you'll then deal with it, either in a preview you'll write, or by just dispatching.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Except that bug 383535 is populated with confused comments, so let's reopen this one.

As Phil notes, we'd need to sniff feed-like content loads to decide whether to preview them (if we ever implement bug 353097) or to hand off the content to something else (probably grab the URL from the about-to-load content and hand it to feed://).
Blocks: 353097
Status: RESOLVED → UNCONFIRMED
Depends on: 368021
Resolution: DUPLICATE → ---
Summary: RSS links with proper MIME type are downloaded instead of opened → use nsIFeedSniffer to help dispatch feed-like content (RSS links with proper MIME type are downloaded instead of opened)
Status: UNCONFIRMED → NEW
Ever confirmed: true
This bug has been buried in the graveyard and has not been updated in over 5 years. It is probably safe to assume that it will never be fixed, so resolving as WONTFIX.

[Mass-change filter: graveyard-wontfix-2014-09-24]
Status: NEW → RESOLVED
Closed: 16 years ago10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.