Closed Bug 353987 Opened 19 years ago Closed 19 years ago

missing alternate link in atom feed causes unhandled exception

Categories

(MailNews Core :: Feed Reader, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tuukka.tolvanen, Assigned: tuukka.tolvanen)

References

Details

(Keywords: fixed1.8.1.2)

Attachments

(3 files, 1 obsolete file)

When subscribing to an atom feed where the feed element does not have a link rel="alternate" child, tbird fails to subscribe, and ui is left with progress bar + status message "Verifying the RSS feed..." Virhe: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIRDFService.GetLiteral]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: chrome://messenger-newsblog/content/Feed.js :: anonymous :: line 290" data: no] Lähdetiedosto: chrome://messenger-newsblog/content/Feed.js Rivi: 290 I don't think rfc 4287 requires that one, and regardless the error should be handled better. tbird trunk 20060915 linux
Got a sample URL?
Attached file working example feed
not really since I came across this while piling a feed hack on top of a forum hack... but here's the first google hit of an atom feed
Attached file failing example feed
...and same with feed/link rel=alternate removed
this may be related, in the general 'not handling bad feeds' department.. the following XML error will cause all further (valid) subscription attempts to fail, requiring a Tb restart. Error: prefix not bound to a namespace Source file: http://planetdma.blogspot.com/atom.xml Line: 154, Column: 1 Source code: <o:p> ^
This also applies to 2.0 Beta 2 (on Windows). エラー: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIRDFService.GetLiteral]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: chrome://messenger-newsblog/content/Feed.js :: anonymous :: line 287" data: no] ソースファイル: chrome://messenger-newsblog/content/Feed.js 行: 287 Google Groups Atom feeds do not work, while RSS feeds do.
Attached patch patch1 (obsolete) — Splinter Review
patch1: in parseAsAtomIETF, don't set a null aFeed.link; fixes subscribing to e.g. http://groups.google.com/group/mozilla.dev.planning/feed/atom_v1_0_msgs.xml
Assignee: mscott → tuukka.tolvanen
Status: NEW → ASSIGNED
Attached patch patch2Splinter Review
...on second thought, patch1 is odd because the same courtesy is not paid to other nonrequired things in parseAsAtomIETF as they aren't susceptible to death by rdf; this instead nullchecks right before talking to rdf, i.e. Feed.item = null shall mean not setting one.
Attachment #253892 - Attachment is obsolete: true
Attachment #253899 - Flags: superreview?
Attachment #253899 - Flags: review?(sayrer)
Attachment #253899 - Flags: superreview? → superreview?(mscott)
Attachment #253899 - Flags: review?(sayrer) → review+
Comment on attachment 253899 [details] [diff] [review] patch2 thanks tuukka!
Attachment #253899 - Flags: superreview?(mscott)
Attachment #253899 - Flags: superreview+
Attachment #253899 - Flags: approval-thunderbird2+
Whiteboard: [checkin needed]
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1.2
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: