We were looking at all active streams, but that also includes promised
streams.
By the RFC the limitation that our peer specifies only applies to the
number of streams _we_ create, not the total amount of active streams.
More importantly, for the qhttp2protocolhandler it could mean that we
could end up having a few promised streams push the active stream count
over the limit, which could lead us to start more streams than intended
(then bounded by the number of queued requests).
The worst case in this scenario is that a **non-compliant** server
doesn't track how many connections we open and the user has queued
a ton of requests, so we open a ton of streams.
But on the upside: server-push is not widely used.
Pick-to: 6.7
Change-Id: I2a533472eb9127fd176bb99e9db0518f05c3fffe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
CreateStream returns a new error code, StreamIdsExhausted, when next
stream id counter exceeds max stream id instead of assert.
Task-number: QTBUG-122375
Pick-to: 6.7
Change-Id: I653b20c24c1429fe88d476beb1ca952aa1bbb320
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When adjusting handling for the special traling HEADERS with PRIORITY
case the actual no-headers case handling was lost.
This patch adds it back.
Now it deals with it being empty due to overflow or just empty headers.
With a real server this should never happen though, since they either
send the required headers or don't send a HEADER frame at all. So, in
theory it will not have caused a problem for users.
Pick-to: 6.7 6.6
Change-Id: Iacbb1183f26cb1f2e7e30ace6456488c4671972d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
And move a public slot into private slot, because it was not intended to
be public.
Change-Id: I847fa510c29e5f63aaace0797c81b9874007fda0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
And it should also apply to the promised streams, not separate ID tracking.
https://datatracker.ietf.org/doc/html/rfc9113#section-5.1.1
Change-Id: I6826a39c98f9b6a585200e628533843db731a85b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
The static function appeared in two places, and in a unity-build
this fails quite visibly.
Pick-to: 6.7
Change-Id: I60000d01194a2c79ca9c101f2a6d3f77f469f1a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
For use in QtGRPC.
There is some duplication between this code and the code in
QHttp2ProtocolHandler. But let's not change the implementation of
the protocol handler after the 6.7 beta release. Nor do I think we
should do it for 6.8 LTS. So let's just live with the duplication
until that has branched.
Pick-to: 6.7
Fixes: QTBUG-105491
Change-Id: I69aa38a3c341347e702f9c07c27287aee38a16f2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>