[
https://issues.apache.org/jira/browse/HTTPCORE-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951035#comment-16951035
]
Roy Hashimoto commented on HTTPCORE-606:
----------------------------------------
Hmm. Did you remove all the response body data from your curl log for brevity?
I just want to verify that you did see all that data come through. Your curl
log does have:
{{curl: (16) Error in the HTTP2 framing layer}}
at the end, which is the same error I'm seeing.
How do I enable the HttpCore logging?
Here's my verbose curl output (I am not removing any response body for brevity;
curl just isn't showing any):
{{$ curl -k -v https://localhost:8080/}}
{{* Trying ::1...}}
{{* TCP_NODELAY set}}
{{* Connected to localhost (::1) port 8080 (#0)}}
{{* ALPN, offering h2}}
{{* ALPN, offering http/1.1}}
{{* Cipher selection:
ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH}}
{{* successfully set certificate verify locations:}}
{{* CAfile: /etc/ssl/cert.pem}}
{{ CApath: none}}
{{* TLSv1.2 (OUT), TLS handshake, Client hello (1):}}
{{* TLSv1.2 (IN), TLS handshake, Server hello (2):}}
{{* TLSv1.2 (IN), TLS handshake, Certificate (11):}}
{{* TLSv1.2 (IN), TLS handshake, Server key exchange (12):}}
{{* TLSv1.2 (IN), TLS handshake, Server finished (14):}}
{{* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):}}
{{* TLSv1.2 (OUT), TLS change cipher, Client hello (1):}}
{{* TLSv1.2 (OUT), TLS handshake, Finished (20):}}
{{* TLSv1.2 (IN), TLS change cipher, Client hello (1):}}
{{* TLSv1.2 (IN), TLS handshake, Finished (20):}}
{{* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256}}
{{* ALPN, server accepted to use h2}}
{{* Server certificate:}}
{{* subject: C=US; ST=California; L=San Bruno; CN=localhost}}
{{* start date: Sep 11 18:06:05 2019 GMT}}
{{* expire date: Sep 11 18:06:05 2023 GMT}}
{{* issuer: C=US; ST=New Jersey; O=Yoyodyne Propulsion Systems; CN=Yoyodyne
Propulsion Systems CA}}
{{* SSL certificate verify ok.}}
{{* Using HTTP2, server supports multi-use}}
{{* Connection state changed (HTTP/2 confirmed)}}
{{* Copying HTTP/2 data in stream buffer to connection buffer after upgrade:
len=0}}
{{* Using Stream ID: 1 (easy handle 0x7fcec5007200)}}
{{> GET / HTTP/2}}
{{> Host: localhost:8080}}
{{> User-Agent: curl/7.54.0}}
{{> Accept: */*}}
{{> }}
{{* Connection state changed (MAX_CONCURRENT_STREAMS updated)!}}
{{< HTTP/2 200 }}
{{< content-type: text/plain}}
{{< date: Mon, 14 Oct 2019 14:09:05 GMT}}
{{< }}
{{* Closing connection 0}}
{{* TLSv1.2 (OUT), TLS alert, Client hello (1):}}
{{curl: (16) Error in the HTTP2 framing layer}}
I can add server logging if I figure out how to activate it.
> HTTP2 framing layer error with HttpCore 5.0 server
> --------------------------------------------------
>
> Key: HTTPCORE-606
> URL: https://issues.apache.org/jira/browse/HTTPCORE-606
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Components: HttpCore
> Affects Versions: 5.0-beta9
> Reporter: Roy Hashimoto
> Priority: Major
> Attachments: ConscryptTest.java
>
>
> The attached file implements a simple H2/TLS server that returns a roughly 64
> KB response. Things work fine when HTTP1 is used but with HTTP2 a framing
> layer error is reported.
> Using curl:
> {{$ curl -k https://localhost:8080/}}
> {{curl: (16) Error in the HTTP2 framing layer}}
> Using Chrome:
> {{GET https://localhost:8080/ net::ERR_HTTP2_FRAME_SIZE_ERROR 200}}
> I'm using Conscrypt (org.conscrypt:conscrypt-openjdk-uber:2.2.1) because I
> currently have only Java 8 environments so that's how I enable H2. I don't
> know if the bug is related to the JSSE implementation or not. I did try to
> disable TLS on the server and connect with {{curl --http2}} but that didn't
> work - curl offered to upgrade but the server returned HTTP1 and the error
> doesn't happen with HTTP1.
> The response is big enough that writing the response body data to the
> DataStreamChannel does not consume it all in one call. I believe this might
> be a factor because if I instead dribble the data out with small writes over
> time like this then no error occurs:
> {{private int counter = 0;}}
> {{@Override}}
> {{public void produce(DataStreamChannel channel) throws IOException {}}
> {{ if (counter < 4096) {}}
> {{ ByteBuffer buffer = ByteBuffer.wrap(String.format("%4d:0123456789\n",
> counter).getBytes());}}
> {{ counter++;}}
> {{ channel.write(buffer);}}
> {{ new Thread(() -> {}}
> {{ try {}}
> {{ Thread.sleep(50);}}
> {{ } catch (InterruptedException ignored) {}}
> {{ }}}
> {{ channel.requestOutput();}}
> {{ }).start();}}
> {{ } else {}}
> {{ channel.endStream();}}
> {{ }}}
> {{}}}
> To run the test program you will need to modify the code at the beginning of
> {{main}} to load your own X509 KeyStore. Connect to the server with an
> H2-capable client on port 8080.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]