Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl: Fix response status parsing #633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deathbeam
Copy link
Contributor

The response headers can have multiple steps in them, example:

"HTTP/1.1 200 Connection established",
"",
"HTTP/1.1 400 Bad Request",
"Content-Security-Policy: default-src 'none'; sandbox", "Content-Type: text/plain; charset=utf-8",
"Strict-Transport-Security: max-age=31536000",
"X-Content-Type-Options: nosniff",

before this would be reported as 200 incorrectly instead of 400 bad request. this fixes that issue

The response headers can have multiple steps in them, example:

"HTTP/1.1 200 Connection established",
"",
"HTTP/1.1 400 Bad Request",
"Content-Security-Policy: default-src 'none'; sandbox",
"Content-Type: text/plain; charset=utf-8",
"Strict-Transport-Security: max-age=31536000",
"X-Content-Type-Options: nosniff",

before this would be reported as 200 incorrectly instead of 400 bad request.
this fixes that issue

Signed-off-by: Tomas Slusny <[email protected]>
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.

1 participant