Navigation Menu

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

Unsupported response code in HTTP response since 7.79.0 #7738

Closed
glenndeb opened this issue Sep 17, 2021 · 13 comments
Closed

Unsupported response code in HTTP response since 7.79.0 #7738

glenndeb opened this issue Sep 17, 2021 · 13 comments
Assignees

Comments

@glenndeb
Copy link

glenndeb commented Sep 17, 2021

I did this

I noticed a curl exception on the server due to an cURL error 1: Unsupported response code in HTTP response. When digging deeper, I found curl was updated on the 15th of september. Following up, I executed the exact CURL command in 7.78.0 and this worked.

curl --location --request POST 'https://id.b2b.verizonmedia.com/identity/oauth2/access_token' -v

curl/libcurl version

7.79.0

[curl -V output]

curl 7.79.0 (x86_64-alpine-linux-musl) libcurl/7.79.0 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 nghttp2/1.42.0
Release-Date: 2021-09-15
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

@bagder bagder added the HTTP label Sep 17, 2021
@bagder bagder self-assigned this Sep 17, 2021
@bagder
Copy link
Member

bagder commented Sep 17, 2021

The "reason phrase" after the response code starts with a digit which is wrongly treated as the forth response code digit. Fix coming up!

bagder added a commit that referenced this issue Sep 17, 2021
When the "reason phrase" in the HTTP status line starts with a digit,
that was treated as the forth response code digit and curl would claim
the response to be non-compliant.

Added test 1466 to verify this case.

Regression brought by 5dc594e
Reported-by: Glenn de boer
Fixes #7738
@bagder
Copy link
Member

bagder commented Sep 17, 2021

I could perhaps also add that this happened because sscanf's %d skips leading whitespace which I had forgot when I did 5dc594e

@ingwinlu
Copy link

Alpine already rolled out 7.79.0 which includes this defect. A fast release after the fix would be appreciated.

@jay
Copy link
Member

jay commented Sep 17, 2021

Alpine already rolled out 7.79.0 which includes this defect. A fast release after the fix would be appreciated.

7.79.1 patch release is next Wednesday

@bagder bagder closed this as completed in beb8990 Sep 17, 2021
@jay jay pinned this issue Sep 17, 2021
@bagder
Copy link
Member

bagder commented Sep 17, 2021

ah yes, good idea to pin! 👍

@glenndeb
Copy link
Author

Will this version be automatically available in the Alpine repository on Wednesday?

@bagder
Copy link
Member

bagder commented Sep 20, 2021

@glenndeb I think you need to ask the Alpine team about Alpine details. We as in the curl project will ship curl 7.79.1 on Wednesday Sep 22, 2021 (around 06:00 UTC). Then it is typically the job of distributions to build and package that release and put that update into their respective software reposutories. That procedure is not always instant but might take a while depending on work load etc.

@bagder
Copy link
Member

bagder commented Sep 20, 2021

I believe @xquery intends to update the official curl docker image to 7.79.1 in close association with the release as well.

@ocefpaf
Copy link

ocefpaf commented Sep 22, 2021

Just wanted to show some love to curl devs. Hit the issue, googled it, and found out that is already solved! Thanks so much!!

@theloveofcode
Copy link

It doesn't look like this fixed worked. The original example brought up by @glenndeb still throws the same error:
curl --location --request POST 'https://id.b2b.verizonmedia.com/identity/oauth2/access_token' -v

You can see the same thing here, where 401 is both the response code and the reason phrase.
curl -I https://checkout-test.adyen.com/checkout/v67/paymentMethods -v

Alpine has already updated to 7.79.1

@bagder
Copy link
Member

bagder commented Sep 22, 2021

@theloveofcode both those URLs work when I try them with 7.79.1 or git master

@theloveofcode
Copy link

@bagder Yes, it seems that's true. For some reason even though I'm running apk update && apk upgrade curl and I still see > User-Agent: curl/7.79.1 and * Unsupported response code in HTTP response, newer deployments seem to work as expected.

@glenndeb
Copy link
Author

Just wanted to show some love to curl devs. Hit the issue, google, and found out that is already solved! Thanks so much!!

I agree, thanks for all the work and quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants