Skip to content

fix: better deal with proxy returning proxy headers (in response to cURL's Proxy-Connection header)#698

Merged
mblaney merged 2 commits intosimplepie:masterfrom
shunf4:master
Nov 13, 2021
Merged

fix: better deal with proxy returning proxy headers (in response to cURL's Proxy-Connection header)#698
mblaney merged 2 commits intosimplepie:masterfrom
shunf4:master

Conversation

@shunf4
Copy link
Contributor

@shunf4 shunf4 commented Oct 11, 2021

Some HTTP proxy returns headers like this:

HTTP/1.1 200 Connection established\r\n
Connection: close\r\n
(Other headers...)
\r\n
(Headers and bodies of actual HTTP response)

So the code just detecting "HTTP/1.0 200 Connection established\r\n\r\n" won't work with these proxies.

A better way will be split the payload by \r\n\r\n, skip the first part and keep the remaining parts.

@mblaney
Copy link
Member

mblaney commented Nov 13, 2021

ok thanks @shunf4

@mblaney mblaney merged commit ebdd064 into simplepie:master Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants