RSS media enclosures type is not deduced from extension when missing
Categories
(MailNews Core :: Feed Reader, enhancement)
Tracking
(thunderbird68 fixed, thunderbird69 fixed)
People
(Reporter: layus, Assigned: alta88)
Details
Attachments
(1 file)
1.46 KB,
patch
|
mkmelin
:
review+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
Subscribe to a feed with a media:content enclosure. For example this one https://www.mediapart.fr/articles/feed
Actual results:
The image was not displayed inline, as is the case with other rss feeds.
After investigation, it turns out that the stream does not provide a "type" tag in the media:content element, only the url tag.
Expected results:
As the image url ends with .jpg
, Thunderbird could make a more educated guess than the default application/unknown
from https://dxr.mozilla.org/comm-central/rev/2a29ee0adb310b54a6a2df72034953fed8f2b043/comm/mailnews/extensions/newsblog/content/FeedItem.js#400 . The image would thus be displayed normally.
It makes sense to perform the guess, as the type tag is not mandatory as per media-rss spec.
Sure, why not.
Reporter | ||
Comment 2•5 years ago
|
||
Comment on attachment 9067421 [details] [diff] [review] mediaType.patch Review of attachment 9067421 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for providing such a quick fix ! The patch looks good to me (quite obviously), but I did not test it. I could not find the required js interface. I was looking for nsIMime in dxr. Got bitten by case sensitivity. Thanks again :-)
Comment 3•5 years ago
|
||
Comment on attachment 9067421 [details] [diff] [review] mediaType.patch Review of attachment 9067421 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, r=mkmelin
Comment 4•5 years ago
|
||
Comment on attachment 9067421 [details] [diff] [review] mediaType.patch Beta material, right?
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/650172622d99
deduce RSS media enclosures type from extension when missing. r=mkmelin
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Reporter | ||
Comment 8•5 years ago
|
||
Finally got a chance to test it. It is working perfectly, thanks !
Description
•