-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
HTTP/2 (h2c) upgrade in clear-text problem #7633
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
Comments
Upon receiving the 101 response, the client MUST send a connection |
and read golang src, golang.org/x/net/http2/h2c/h2c.go line 192.
|
|
Can you use some tools to capture the package into file and show it to me. i use wireshark on windows and not find client send this -> " PRI *HTTP/2.0\r\n\r\nSM\r\n\r\n" maybe nghttp2 is not Compatible with golang server. |
Please teach me whether the client should send a Connection preface message after receiving the Upgrade message. i think client need, and read golang server, it also drainClientPreface. but i use wireshark, i can't find package Client Preface(this -> " PRI *HTTP/2.0\r\n\r\nSM\r\n\r\n"). |
Yes! I Found! golang.org/x/net/http2/h2c/h2c.go line 192 to line 196.
|
But I don't think it was Golang's fault. In RFC7540 (Section 3.2): I think Curl or NGHTTP2 does not follow the RFC specification. |
I've failed to reproduce this problem myself, so can I ask you to provide us with more details on how to go ahead and repeat this. Preferably with a command line or a stand-alone program we can run from our ends against a public URL to trigger the problem? |
I Send e-mail to you. Please do not disclose this IP address, thank you. |
You then assume that nobody else than me wants and can debug or help out here? |
I'm Sorry,My server is not secure, so I dare not expose the public network. |
I try revert 455a63c
|
I can't repro that error. With the reverted commit I get this (debug build):
|
I revert 455a63c
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) |
Probably, but as I've said: I cannot reproduce that. |
I Use git clone master branch and revert code.
|
|
I believe the Your server sends a |
Ok, thank you very much. I'll try to learn the difference between HEAD and GET requests. |
The revert is still needed so this issue is still real and thus you closed it prematurely. |
Sorry, I will reopen it, so when should I close this issue? |
When we merged the fix, which was done already. |
I did this
I use curl and Golang HttpClient to call my service.
Golang's HttpClient is working fine.
curl:
This does not work if --http2 is used.
This works if use --http2-prior-knowledge.
I expected the following
both use --http2 and --http2-prior-knowledge working fine.
curl/libcurl version
Windows:
curl 7.78.0 (x86_64-pc-win32) libcurl/7.78.0 OpenSSL/1.1.1l (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.2 libssh2/1.9.0 nghttp2/1.44.0 libgsasl/1.10.0
Release-Date: 2021-07-21
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI TLS-SRP UnixSockets zstd
Linux:
curl 7.78.0 (x86_64-pc-linux-gnu) libcurl/7.78.0 zlib/1.2.7 nghttp2/1.44.0
Release-Date: 2021-07-21
Protocols: dict file ftp gopher http imap mqtt pop3 rtsp smtp telnet tftp
Features: alt-svc AsynchDNS HTTP2 IPv6 Largefile libz UnixSockets
[curl -V output]
operating system
Linux 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: