SimplePie use single constant for default HTTP Accept header#5083
SimplePie use single constant for default HTTP Accept header#5083Alkarex merged 4 commits intoFreshRSS:edgefrom
Conversation
And add missing headers in `SimplePie_Locator::body()` Follow-up of simplepie/simplepie@5d966b9
Fix FreshRSS#5079 (comment) The `*/*` breaks Mastodon content negotiation
lib/SimplePie/SimplePie/File.php
Outdated
| class SimplePie_File | ||
| { | ||
|
|
||
| const DEFAULT_HTTP_ACCEPT = 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.7, text/html;q=0.6, text/plain;q=0.5, application/octet-stream;q=0.1'; |
There was a problem hiding this comment.
Hold on, are you absolutely sure you want to remove */*? If Mastodon doesn't work that's Mastodon's problem. That doesn't mean we should break everything.
There was a problem hiding this comment.
Also I'd like to emphasize there's nothing "fix" about "work around Mastodon's problem".
There was a problem hiding this comment.
The thing is that we are not able to read other things, so we are actually lying when saying */*.
But I do believe there is a bug in Mastodon, and I might try to have a look (but not in the coming days).
We can postpone to 1.22 to give it a longer try in edge.
There was a problem hiding this comment.
How I've interpreted this header for the past decade is that the idea is to tell the server to send over its stuff and we'll give it a go, because it might be XML we can handle with some random incorrect mimetype.
Imho it's far from obvious that we should give broken Mastodon preference, because broken server configurations are usually just a minor user mistake of some sort in e.g. Apache or Nginx which are otherwise not broken.
There was a problem hiding this comment.
I have reverted the change of HTTP Accept for now, especially since there seems to be an easy fix for Mastodon (only some versions seem broken), by being explicit about the RSS feed address. Example: https://framapiaf.org/@davidrevoy.rss
|
Partial upstream PR: simplepie/simplepie#784 |
This reverts commit 13a5a5c.
Follow-up of simplepie/simplepie@5d966b9
SimplePie_Locator::body()Fix #5079 (comment)The*/*breaks Mastodon content negotiation