-
Notifications
You must be signed in to change notification settings - Fork 393
Description
Some feeds are not parsed correctly due to wrong handling of HTTP trailer headers such as Server-Timing.
Example of feed:
https://www.caranddriver.com/rss/all.xml
(Note that the bug may or may not exhibit itself depending on the cURL and PHP versions)
Downstream discussion:
SimplePie tries to XML parse something like </rss>server-timing: rtt; dur=6.131, retrans; dur=0, trailer-timestamp; dur=1758222994925 which obviously fails.
In the case of normal HTTP transfer (not chunked), we need to use content-length to know where the body stops, but content-length is wrong if any compression was used.
So I believe we should let cURL perform the separation of HTTP headers and body instead of using the SimplePie parser.
I have a downstream fix for FreshRSS. Let me know if you are interested in such an approach for an upstream PR: