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

Cannot handle HTTP/2 responses #3

Closed
C-Otto opened this issue Nov 10, 2019 · 5 comments
Closed

Cannot handle HTTP/2 responses #3

C-Otto opened this issue Nov 10, 2019 · 5 comments

Comments

@C-Otto
Copy link

C-Otto commented Nov 10, 2019

Curl seems to do HTTP/2 requests lately, which breaks the script. Adding --http1.1 to the curl calls helps, but this feels like a hack.

@bruncsak
Copy link
Owner

Thanks for reporting the problem!
I fixed the code, please let me know if you are still having problem to use a recent version of curl.

@C-Otto
Copy link
Author

C-Otto commented Nov 12, 2019

I didn't try your code, but I tried a similar fix. I think the response headers are all lowercase with HTTP/2, which the code does not expect. I'll check when I find the time.

@alexzorin
Copy link

alexzorin commented Jan 10, 2020

Yes, on a relatively modern system where curl is linked against nghttp2, the script can't find location/replay-nonce when they are lower-cased, which is a MUST in HTTP/2 .

For example:

$ ./letsencrypt.sh register -a account.key -e [email protected]
register account
could not fetch new nonce
unhandled response while registering account

HTTP/2 400
server: nginx
date: Fri, 10 Jan 2020 21:42:50 GMT
content-type: application/problem+json
content-length: 114
cache-control: public, max-age=0, no-cache
link: <https://acme-v02.api.letsencrypt.org/directory>;rel="index"
replay-nonce: 0002EOKsggTfccAWuMjEni91orI0qctSzED0Ncvy1TJ-iiQ

{
  "type": "urn:ietf:params:acme:error:malformed",
  "detail": "No embedded JWK in JWS header",
  "status": 400
}

Other shell-based ACME clients made similar fixes a few months ago:

@bruncsak
Copy link
Owner

Yes, on a relatively modern system where curl is linked against nghttp2, the script can't find location/replay-nonce when they are lower-cased, which is a MUST in HTTP/2 .

Thank you very much for testing the code. I believe that it is fixed now with the commit 8232b73.

@alexzorin
Copy link

Works for me.

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

No branches or pull requests

3 participants