http2: improve rate limiting of downloads

Set the initial stream window size to 64KB and increase that to the 10MB
we used to start with on the first server reply, unless a rate limit is
in effect.

Continously monitory changes to the transfers rate limit and adjust the
stream window size accordingly. `max_recv_speed` is a transfer propert
that can be changed during processing by a callback.

Closes #14326
This commit is contained in:
Stefan Eissing 2024-08-01 09:53:50 +02:00 committed by Daniel Stenberg
parent 4abf97b0a6
commit eb0a366b70
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 103 additions and 50 deletions

View file

@ -54,7 +54,7 @@ User-Agent: curl/%VERSION
Accept: */*
Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA
HTTP2-Settings: AAMAAABkAAQAAQAAAAIAAAAA
</protocol>

View file

@ -49,7 +49,7 @@ User-Agent: curl/%VERSION
Accept: */*
Connection: Upgrade, HTTP2-Settings
Upgrade: %H2CVER
HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA
HTTP2-Settings: AAMAAABkAAQAAQAAAAIAAAAA
</protocol>
</verify>