Re: Weird MAX_CONCURRENT_STREAMS value with empty HTTP/2 SETTINGS frame
Date: Mon, 8 Jun 2020 14:37:51 +0200 (CEST)
Thank you both for your replies.
> Seems like it might be a nghttp2 issue though, as it tells curl there's a
> settings frame and the curl code simply reads what nghttp2 told it...
> Is this reproducible against a public site?
It seems that <https://twitter.com> answers with an empty SETTINGS frame and curl/nghttp2 says it allows 4294967295 MAX_CONCURRENT_STREAMS (which is maybe true, but seems a lot compared to the value of ~100 concurrent streams seen on most other HTTP/2 servers).
% curl -v --http2 --output /dev/null https://twitter.com
* Using Stream ID: 1 (easy handle 0x55f48bccf040)
> GET / HTTP/2
> Host: twitter.com
> user-agent: curl/7.68.0
> accept: */*
* Connection state changed (MAX_CONCURRENT_STREAMS == 4294967295)!
< HTTP/2 200
% nghttp -nv https://twitter.com
[ 0.139] Connected
The negotiated protocol: h2
[ 0.371] recv SETTINGS frame <length=6, flags=0x00, stream_id=0>
[ 0.372] send HEADERS frame <length=36, flags=0x25, stream_id=13>
; END_STREAM | END_HEADERS | PRIORITY
(padlen=0, dep_stream_id=11, weight=16, exclusive=0)
; Open new stream
accept-encoding: gzip, deflate
[ 0.486] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
[ 0.529] recv (stream_id=13) :status: 200
> The default max concurrent streams in nghttp2 is 4294967295.
Thanks for the links. I understand nghttp2 defines this value to UINT32_MAX, due to the fact that this is the maximum allowed by the RFC <https://github.com/nghttp2/nghttp2/commit/16c46114dc724278beaa6d59462f8396f35fa4a9>.
As I see it, the HTTP/2 server didn't explicitly send the number of MAX_CONCURRENT_STREAMS supported in a SETTINGS frame, so nghttp2 uses its default value (4294967295) and curl reads this value. I am right or did I miss something ?