Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Inverle
Copy link
Contributor

@Inverle Inverle commented Aug 28, 2025

Regression from #7760

After curl followed any redirects there would incorrectly be HTTP headers from the next response in the parsed response body.

Test feeds:

  • https://research.securitum.com/feed/
    • FreshRSS tried to fetch /favicon.ico to download the icon, got redirected and the default WordPress icon didn't download correctly due to isImgMime() failing when seeing HTTP headers at the beginning
  • https://turnoff.us/feed.xml
    • Set html as the CSS selector and click preview, see headers:
image

@Inverle Inverle marked this pull request as draft August 28, 2025 11:50
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

…` instead

Simply notify SimplePie of the redirect count before parsing
@Inverle Inverle marked this pull request as ready for review August 28, 2025 12:17
@Inverle
Copy link
Contributor Author

Inverle commented Aug 28, 2025

@Frenzie can you check again?

used approach from

$responseHeaders = \SimplePie\HTTP\Parser::prepareHeaders((string) $responseHeaders, $info['redirect_count'] + 1);
instead

@Frenzie
Copy link
Member

Frenzie commented Aug 28, 2025

Oh yes, with a max number of redirects is obviously better. I'd overlooked that. :-)

@Alkarex Alkarex added this to the 1.28.0 milestone Aug 28, 2025
@Alkarex Alkarex merged commit 43248b4 into FreshRSS:edge Aug 30, 2025
1 check passed
@Inverle Inverle deleted the fix-parse-curl-resp branch August 30, 2025 15:40
@Alkarex Alkarex modified the milestones: 1.28.0, 1.27.1 Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants