Skip to content

curl: Fix response status parsing #633

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

Merged
merged 1 commit into from
Feb 11, 2025
Merged

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]>
@pidgeon777
Copy link

Hello, is there any chance this PR can be merged?

@unclenull
Copy link

@deathbeam @pidgeon777 @willnorris @dlee @rockerBOO Anybody still takes care of this?

@Conni2461
Copy link
Collaborator

Thanks for the fix. sorry about everyone who got pinged. @unclenull managed to ping everyone who isnt maintaining the repository rather than the actual maintainer.

@Conni2461 Conni2461 merged commit 20fe347 into nvim-lua:master Feb 11, 2025
7 checks passed
@deathbeam deathbeam deleted the curl-output branch February 11, 2025 21:35
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.

4 participants