mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-30 08:01:07 -05:00
* SimplePie: Fix HTTP 301 permanent redirection When adding feeds it worked fine, but detecting permanent redirects for existing feeds was sometimes broken (only when PHP open_basedir was not set). Indeed, using the built-in CURLOPT_FOLLOWLOCATION instead of the manual method in SimplePie hides the list of HTTP redirects along the way, and prevents the distinction of e.g. 301 vs. 302 redirects. This patch disables CURLOPT_FOLLOWLOCATION in SimplePie, and fixes the manual method at the same time. The use of CURLOPT_FOLLOWLOCATION was nevertheless not systematic (only when open_basedir was not set), so now there is only one logic independent of open_basedir. I will send a PR upstream to SimplePie. How to test: pick a feed with 301 redirection such as HTTP to HTTPS, e.g. http://ing.dk/rss/term/341 Manually change back to previous address (to simulate a feed that is changing address) Refresh feed and observe whether the 301 redirect is obeyed. * Wrong blank