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

Skip to content

Update HttpUtil responseParsing to handle multiple HTTP responses#362

Open
sf-cg wants to merge 1 commit intophp-vcr:masterfrom
sf-cg:fix/handle-proxied-responses
Open

Update HttpUtil responseParsing to handle multiple HTTP responses#362
sf-cg wants to merge 1 commit intophp-vcr:masterfrom
sf-cg:fix/handle-proxied-responses

Conversation

@sf-cg
Copy link

@sf-cg sf-cg commented Feb 21, 2022

Context

Within our projects we use a proxy when connecting to some services, and when doing this we get an extra HTTP/... in the response string that is then parsed. Similar to the 100 continue issue, but ours were 200 OK response from the proxy added ontop

What has been done

  • the HttpUtil parsing of response has been update to only get the headers after the last HTTP/ line, which ideally should make this much more flexible than just stripping any 100 continues
  • test added to make sure cases other than 100 continue are treated correctly

How to test

  • If possible use a proxy that adds a response (ideally not 100 continue)
  • check the automated test that was added

@specialtactics
Copy link
Contributor

Good work!

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.

2 participants