Closed Bug 413915 Opened 17 years ago Closed 16 years ago

isValidFeed modifies its first parameter

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 3.1b1

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(2 files)

...which IMHO is messy. Talking to sayrer on IRC the acceptable solution seems to have been that isValidFeed should return the assumed feed type (which defaults to application/rss+xml in the case of a <link rel="feed"> with no type) if the feed is valid, although only page info uses the specific value.

This also fixes a nit in the page info code in that it won't process <link rel="feed" type="application/atom+xml; charset=UTF-8"> correctly because the existing code doesn't canonicalise the feed type if the rel is already feed.
Attached patch Proposed patchSplinter Review
Unfortunately I don't actually build Firefox, so this patch has been written by code inspection. Feel free to nominate someone who builds Firefox to test it.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #299039 - Flags: review?(sayrer)
This looks ok, but a unit test is required. If you can't build this, we'll need to find someone else to write it.
Bug 413891 looks like it has adequate test coverage. Can we dupe and merge the patches?
The test in bug 413891 is just a copy of a test already in the tree, with added links to test expanding discovery to even more things that other browsers don't discover, no? Seems like if that test is adequate, then this is already tested.
Attached patch testsSplinter Review
Neil's patch does pass the existing autodiscovery tests, but that's rather roundabout testing of it, so here's a testcase with a pancake on its head.
Attachment #300607 - Flags: review?(sayrer)
Attachment #299039 - Flags: review?(sayrer) → review+
Attachment #300607 - Flags: review?(sayrer) → review+
http://hg.mozilla.org/mozilla-central/rev/c989ea4a7119
http://hg.mozilla.org/mozilla-central/rev/41790e7f7ae2
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1b1
Version: unspecified → Trunk
Blocks: 454072
Depends on: 458579
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: