summaryrefslogtreecommitdiffstats
path: root/vendor/h2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/h2
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/h2')
-rw-r--r--vendor/h2/.cargo-checksum.json2
-rw-r--r--vendor/h2/CHANGELOG.md18
-rw-r--r--vendor/h2/CONTRIBUTING.md4
-rw-r--r--vendor/h2/Cargo.lock487
-rw-r--r--vendor/h2/Cargo.toml19
-rw-r--r--vendor/h2/examples/akamai.rs2
-rw-r--r--vendor/h2/src/client.rs41
-rw-r--r--vendor/h2/src/codec/framed_read.rs6
-rw-r--r--vendor/h2/src/codec/framed_write.rs84
-rw-r--r--vendor/h2/src/codec/mod.rs5
-rw-r--r--vendor/h2/src/frame/data.rs2
-rw-r--r--vendor/h2/src/frame/mod.rs2
-rw-r--r--vendor/h2/src/frame/settings.rs2
-rw-r--r--vendor/h2/src/hpack/decoder.rs6
-rw-r--r--vendor/h2/src/hpack/table.rs6
-rw-r--r--vendor/h2/src/hpack/test/fixture.rs2
-rw-r--r--vendor/h2/src/lib.rs11
-rw-r--r--vendor/h2/src/proto/connection.rs4
-rw-r--r--vendor/h2/src/proto/mod.rs2
-rw-r--r--vendor/h2/src/proto/settings.rs4
-rw-r--r--vendor/h2/src/proto/streams/counts.rs8
-rw-r--r--vendor/h2/src/proto/streams/flow_control.rs73
-rw-r--r--vendor/h2/src/proto/streams/prioritize.rs50
-rw-r--r--vendor/h2/src/proto/streams/recv.rs90
-rw-r--r--vendor/h2/src/proto/streams/send.rs51
-rw-r--r--vendor/h2/src/proto/streams/state.rs17
-rw-r--r--vendor/h2/src/proto/streams/store.rs42
-rw-r--r--vendor/h2/src/proto/streams/stream.rs12
-rw-r--r--vendor/h2/src/proto/streams/streams.rs22
-rw-r--r--vendor/h2/src/server.rs2
30 files changed, 654 insertions, 422 deletions
diff --git a/vendor/h2/.cargo-checksum.json b/vendor/h2/.cargo-checksum.json
index da0fc8aa9..74b4e2f7c 100644
--- a/vendor/h2/.cargo-checksum.json
+++ b/vendor/h2/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"0c87645f4d9890bfc70dd99fe37b5c99b94b5a7043b8a25cfb62d42746d593ff","CONTRIBUTING.md":"eff9610bd3a73e6c297b9b487a629bcdb40da9090e6e28c26e48fcfd3a899a6c","Cargo.lock":"720c9158952fe6cc393ef7de6933682aa63a58347d497eb25b3cb5f154577df8","Cargo.toml":"d3c598e8b2e5dd723abe7eeb87ac1c89e0c0f4d78ed4af512fcc597b6d0d4a03","LICENSE":"b21623012e6c453d944b0342c515b631cfcbf30704c2621b291526b69c10724d","README.md":"686a7e3e4b488fe813c4fb99b5082e00a168068cd80bdb29c496e8b68f1ce257","examples/akamai.rs":"03cf67ae79e2e33afaaad3d015fb56ed300e21d705898ead29c88a96ca7cddd8","examples/client.rs":"5ad136b838e9d55ae3d1fd8801cec4af88139b58864d6438f75d0e173eb3aeb3","examples/server.rs":"8cc7927c7fe98a2474c41ab0094ba2dc7a2ae6a7f58ce342a4c05bb8056a63a5","src/client.rs":"9fd1117e3fde1ecaa39054bf50d40ab916fe935ad5bda47513b0c87523489bf3","src/codec/error.rs":"e4b494d6234d8e44de22188540af5e3e0964bbaabc1d8339c7702d401c55afa2","src/codec/framed_read.rs":"4c6d474dc7c2611f2b24eed57cc31763898e18b287ba6196e96baa3854e03374","src/codec/framed_write.rs":"d88bd4355286be8d0f054ad104ce3e49ffb41d44f187229aaddc8469c7f0d025","src/codec/mod.rs":"75b18c4dbbb7314823a00cab2843a3ca8f12343214541e23f294af6145718809","src/error.rs":"62af97622e13ec30cc89fdcda7e449f551581356543a9f59437a081cb8f736e4","src/ext.rs":"2fb968f754829fc50392b6ccb4b90cc4c8b88657a5e3a7259f53916e13dc1c91","src/frame/data.rs":"57db65dd5bb52037bea719a89296a278bc129048749f29779a9da0a74bd1a19f","src/frame/go_away.rs":"6b3fe966ed96bb941e55e6af3352d7afa43e9bde78dc261251a38b09f5c73202","src/frame/head.rs":"4073eb70a8ed9ec0ca460e18fb470fca1dbe6900c1ac08d66397ab4d75414e4c","src/frame/headers.rs":"a0e2d02b9c33d97e78dd2886771bfecfb862132aec47d0365e4ab80133411e30","src/frame/mod.rs":"319bad5779e3ab0e74478f3be4e02d844f01d05e9752ad5395847e2c84965ccf","src/frame/ping.rs":"ff4e4059101300e7b03c23d271026b058da4315c3bd68280422e144c2aa1b9e6","src/frame/priority.rs":"9392b7aa2636157024dc645c92d0e450a4d3f7a53bc9de1188d3b61178c2b5fc","src/frame/reason.rs":"45b13202141b1d8b261d64624b276a9b034d8c3f7d9b6870ee41a204589f4e14","src/frame/reset.rs":"91c17a7391fcb516223fd0358f7770524023b33dd6489902ba23e47b8acc9a9e","src/frame/settings.rs":"5dc833335c9ac2512e5cbaf15d302da636b1e822936f94db926f7c5f948c5d9f","src/frame/stream_id.rs":"0aa72cc3d735aa31e4d0cca0a8b94bae75c97d041c3712fe8e49f687881a73fe","src/frame/util.rs":"1a1408ddefe35f9efe5faa5360cb5ecc461fc0846175d4b43031720da7f5188d","src/frame/window_update.rs":"05c1b84478208802d09154f5d6fb5eb886d45397f43ccc6ccbf40bf3be912819","src/fuzz_bridge.rs":"c27c716732c21a972a8bef43c00ee851a78de80259db62f0b6e793008ccf01a3","src/hpack/decoder.rs":"b4a285c20cdc2d4c7ed490aa984534cebbd03391f6661e72534e6c8e3f3b0a6d","src/hpack/encoder.rs":"f62a3dc317e17e3e0e8e13fd1e4dd1f7370d9831ec5c11675a4550952c7f3ede","src/hpack/header.rs":"b99153144455dcbe7f21161efb32cf5a3362aa7aa1180986e2e733348bb3796f","src/hpack/huffman/mod.rs":"01f3de4e479b96d1da31c242a02144aa8c431df540e7e4b984ee3aea5afcd212","src/hpack/huffman/table.rs":"6b7f94af0bb5d236d4e671eff4afe5dc254a20eaddd2d57dd6e8f53e2a60c337","src/hpack/mod.rs":"581033d44fd5525e9ccb546549a99f8357ab8f55d58b490d9980fb36323c5dbc","src/hpack/table.rs":"a3d535cc36137f66b5eab8686447251cf2dabcaba86dd7367fe3feed5c4e8391","src/hpack/test/fixture.rs":"3c4a024b454254be90cc50bcc48872636337ca05f9c8bcf81171bf18f8cbc865","src/hpack/test/fuzz.rs":"89a8b1a79409e811c72897df479e2209f039b253fa6b9aa7510d615966b69d1f","src/hpack/test/mod.rs":"56ad5643e7f1e273e5bce8a6fc0552be39c326dacfffd7f9757ccdbe75e9b66e","src/lib.rs":"2c4f622c33d616d054135aeb6c9c1dcdbfbadd57620dc5c1546aebae513f2ac6","src/proto/connection.rs":"a4abf89b6bf108fd31f8193aa2336d5ff631d80e010de60a1318009d8a0193ac","src/proto/error.rs":"ab9a68acb60753fbb7c7ad54b9aac627cfa5099cf922163f823be618040998a1","src/proto/go_away.rs":"51d467027bc30873fc76166ed731e968a23725e7b106b58ecadcb85044466a5f","src/proto/mod.rs":"55df70fccf764d9cb82bcde93239bb4dd8f6a87da48ebf8248ab2f8e2a52fccb","src/proto/peer.rs":"e26317f7d0a27441e15bf8b4ca4af3e4cca0ea01803027078a088eafb83e0910","src/proto/ping_pong.rs":"21b8f1886ffa18420c4d57a32e8dd2b0cd8665824ace2b44c4e20e101f5aa2c9","src/proto/settings.rs":"d937cfb44d952fe8034b67be603147360540e21654404862d18758fd80c51d22","src/proto/streams/buffer.rs":"cf2205c607f8a6b8aa8662983d9907fedeb14b5890e051d8e63d7bc2b0a960e9","src/proto/streams/counts.rs":"892ff036f29e8316d4fb1b125a43d407109250ef33406391f2749d71e8152b40","src/proto/streams/flow_control.rs":"564de77aa1aaa4652bd98b34ee6609f294eeda3bf5f76b1d3af97082166281f7","src/proto/streams/mod.rs":"1bf49e6bf4b7f315acb66b887e27c340224715e2db824526f94cd578a1de9d76","src/proto/streams/prioritize.rs":"34f5278b8658ea23d73d44215e4e824495edd9574b44996beaf3960652f53d77","src/proto/streams/recv.rs":"4444b5ffae83c6bfee09cf9cb0d50303e89dbef250b5282e72ad4cb9d35803a8","src/proto/streams/send.rs":"2f5547b53a4b9fc8a6b0861dc7fa8e5e43c4dbcb04389c654a64a45c414361c6","src/proto/streams/state.rs":"36bb824d5b07a23de3360d760d8970fb17fc1a98ce76cb4905b9c52c910696c1","src/proto/streams/store.rs":"b1cbbcef3048a79909c0e52cf83e83dfbe7d18b148dbf4d406c290d69db05ecc","src/proto/streams/stream.rs":"984ccf5709970eee36320f973e6927e9cd83b6ab1622b4dff922909318df6313","src/proto/streams/streams.rs":"6b9ddf48337db5a947c7e42b8e139093376996216ea5bf80f939ba2e0f4a6cc8","src/server.rs":"7b8b81186682a23e8595653f5b03295960b020369c0b51217e9f77c6644ba080","src/share.rs":"9b9c48b3198f3856267a6927ee3cac57a8236b8847b515611f55d1ed7b6ba38d"},"package":"d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"f822d678c95c83283fd93d8c5b81bcbba2c6383fce38c1b9fe2c9d464240dfaa","CONTRIBUTING.md":"e10ba2a0ff65716859c70b036dfe9239cc40dd81a5f63b25d24f1bc55000c8fd","Cargo.lock":"323bd5dafab8cd17bcb171b49ab7de974ca7eb698a55936b7b1d61aca341d3b5","Cargo.toml":"7db98d566bde86ff538481292dd745352b5bad8025c7665a35df73a7d32f6496","LICENSE":"b21623012e6c453d944b0342c515b631cfcbf30704c2621b291526b69c10724d","README.md":"686a7e3e4b488fe813c4fb99b5082e00a168068cd80bdb29c496e8b68f1ce257","examples/akamai.rs":"f6e6fa87257f0fc8dc4864d31dfb6de15a5b2a9a04420368733d318e8b424dc1","examples/client.rs":"5ad136b838e9d55ae3d1fd8801cec4af88139b58864d6438f75d0e173eb3aeb3","examples/server.rs":"8cc7927c7fe98a2474c41ab0094ba2dc7a2ae6a7f58ce342a4c05bb8056a63a5","src/client.rs":"64e6bb12e3075c4b779086849d5e5715f237a220c1d85f68b52e76c350a066e2","src/codec/error.rs":"e4b494d6234d8e44de22188540af5e3e0964bbaabc1d8339c7702d401c55afa2","src/codec/framed_read.rs":"8ae7f34d3925b05d6126ac5151e00a066a52f529d3e21010e7008d193edb747a","src/codec/framed_write.rs":"01db6877623e913527fff92cc6a58a7025f97d9a65c4c4df61aa616919964a92","src/codec/mod.rs":"cf9c795756e782c2d01e6020b8e5b76a254e4e9f5dfa7f5d007c6d4287a77f6a","src/error.rs":"62af97622e13ec30cc89fdcda7e449f551581356543a9f59437a081cb8f736e4","src/ext.rs":"2fb968f754829fc50392b6ccb4b90cc4c8b88657a5e3a7259f53916e13dc1c91","src/frame/data.rs":"3f524ce64bf4135c0f248419b1d3af973464a1748bf0d3bab437c5a088f7c22f","src/frame/go_away.rs":"6b3fe966ed96bb941e55e6af3352d7afa43e9bde78dc261251a38b09f5c73202","src/frame/head.rs":"4073eb70a8ed9ec0ca460e18fb470fca1dbe6900c1ac08d66397ab4d75414e4c","src/frame/headers.rs":"a0e2d02b9c33d97e78dd2886771bfecfb862132aec47d0365e4ab80133411e30","src/frame/mod.rs":"06390bf0fd84ced203507f30b806feaedf983e4be31efc8d2359f6ea3b27f95c","src/frame/ping.rs":"ff4e4059101300e7b03c23d271026b058da4315c3bd68280422e144c2aa1b9e6","src/frame/priority.rs":"9392b7aa2636157024dc645c92d0e450a4d3f7a53bc9de1188d3b61178c2b5fc","src/frame/reason.rs":"45b13202141b1d8b261d64624b276a9b034d8c3f7d9b6870ee41a204589f4e14","src/frame/reset.rs":"91c17a7391fcb516223fd0358f7770524023b33dd6489902ba23e47b8acc9a9e","src/frame/settings.rs":"9aed52868a1ddbb5570025edde2e073d3da1291b58d8759bfed7f086d40ef293","src/frame/stream_id.rs":"0aa72cc3d735aa31e4d0cca0a8b94bae75c97d041c3712fe8e49f687881a73fe","src/frame/util.rs":"1a1408ddefe35f9efe5faa5360cb5ecc461fc0846175d4b43031720da7f5188d","src/frame/window_update.rs":"05c1b84478208802d09154f5d6fb5eb886d45397f43ccc6ccbf40bf3be912819","src/fuzz_bridge.rs":"c27c716732c21a972a8bef43c00ee851a78de80259db62f0b6e793008ccf01a3","src/hpack/decoder.rs":"5c909bfd48928cb040e1912b0c83505e9de00ed9f4bf5a4654e6d2aadd11a29f","src/hpack/encoder.rs":"f62a3dc317e17e3e0e8e13fd1e4dd1f7370d9831ec5c11675a4550952c7f3ede","src/hpack/header.rs":"b99153144455dcbe7f21161efb32cf5a3362aa7aa1180986e2e733348bb3796f","src/hpack/huffman/mod.rs":"01f3de4e479b96d1da31c242a02144aa8c431df540e7e4b984ee3aea5afcd212","src/hpack/huffman/table.rs":"6b7f94af0bb5d236d4e671eff4afe5dc254a20eaddd2d57dd6e8f53e2a60c337","src/hpack/mod.rs":"581033d44fd5525e9ccb546549a99f8357ab8f55d58b490d9980fb36323c5dbc","src/hpack/table.rs":"6efc933d47355050ed4119e8438513d31f966ccd20ac70a5c51721052184de81","src/hpack/test/fixture.rs":"8a0cfbdc314da9d6f98d0329e41f8b804011305d5f3047ef60faf39038541411","src/hpack/test/fuzz.rs":"89a8b1a79409e811c72897df479e2209f039b253fa6b9aa7510d615966b69d1f","src/hpack/test/mod.rs":"56ad5643e7f1e273e5bce8a6fc0552be39c326dacfffd7f9757ccdbe75e9b66e","src/lib.rs":"89108230365ed0645dec359cfd8ae1ccfcd236318848c6d282f55998a7b5e880","src/proto/connection.rs":"a68bb62afbba9ab9b4d74e9bbedf9a1d7e7d0e7c7b62f1cf6a725456d01c298f","src/proto/error.rs":"ab9a68acb60753fbb7c7ad54b9aac627cfa5099cf922163f823be618040998a1","src/proto/go_away.rs":"51d467027bc30873fc76166ed731e968a23725e7b106b58ecadcb85044466a5f","src/proto/mod.rs":"c9c7e30c44df73d267296f5c1dbaaf8402041beb6e525d5f75cf2fde05d2a1c8","src/proto/peer.rs":"e26317f7d0a27441e15bf8b4ca4af3e4cca0ea01803027078a088eafb83e0910","src/proto/ping_pong.rs":"21b8f1886ffa18420c4d57a32e8dd2b0cd8665824ace2b44c4e20e101f5aa2c9","src/proto/settings.rs":"e9c3fa389122f0591c746ca7ffe3dfce986d1a2aa9366b06ecf3f7ecc7e89839","src/proto/streams/buffer.rs":"cf2205c607f8a6b8aa8662983d9907fedeb14b5890e051d8e63d7bc2b0a960e9","src/proto/streams/counts.rs":"b03d849fe4fd685ffb5da520a863fffb9cb55cd731cd2dcc78324aa55978a7ba","src/proto/streams/flow_control.rs":"a8b3c5cd24b1f83770576ba21d5fcd555f144afd88f246f7d5dbe9e39563c74a","src/proto/streams/mod.rs":"1bf49e6bf4b7f315acb66b887e27c340224715e2db824526f94cd578a1de9d76","src/proto/streams/prioritize.rs":"23398cc237d68a117dedda3fe806c54990f361ab37aca7476021ab023c5acf89","src/proto/streams/recv.rs":"88429a855ebde2a080a5279746bd1d9491e7f6daa44d5ecdf065049761d0df35","src/proto/streams/send.rs":"2ef000b5c24d94f997ee74152f7a810a4403087590d141310fc4835ab8261efc","src/proto/streams/state.rs":"8d818ffe4d2c0d0703f771c8770e396e9bc6a2b3568e64ba8e9d54606a6c6726","src/proto/streams/store.rs":"603ea7a0ad9d8c0ef709b230b74d28c95af1bdae55ff6e6ee0e89d0d14f093c8","src/proto/streams/stream.rs":"721af69c69d42410932dc72c8db33ab5e60733c1b2b747a817f1933b7dc8a095","src/proto/streams/streams.rs":"1c30a55600c84685f396c4862b81552f5e8d4cab5b93f6a16f58e404080e221c","src/server.rs":"25afaf808e8523c40d412d37d708fdd04ad76f4c0e2c1001bdd66563f6e7b655","src/share.rs":"9b9c48b3198f3856267a6927ee3cac57a8236b8847b515611f55d1ed7b6ba38d"},"package":"4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"} \ No newline at end of file
diff --git a/vendor/h2/CHANGELOG.md b/vendor/h2/CHANGELOG.md
index 875cc70b2..00d69725a 100644
--- a/vendor/h2/CHANGELOG.md
+++ b/vendor/h2/CHANGELOG.md
@@ -1,3 +1,21 @@
+# 0.3.22 (November 15, 2023)
+
+* Add `header_table_size(usize)` option to client and server builders.
+* Improve throughput when vectored IO is not available.
+* Update indexmap to 2.
+
+# 0.3.21 (August 21, 2023)
+
+* Fix opening of new streams over peer's max concurrent limit.
+* Fix `RecvStream` to return data even if it has received a `CANCEL` stream error.
+* Update MSRV to 1.63.
+
+# 0.3.20 (June 26, 2023)
+
+* Fix panic if a server received a request with a `:status` pseudo header in the 1xx range.
+* Fix panic if a reset stream had pending push promises that were more than allowed.
+* Fix potential flow control overflow by subtraction, instead returning a connection error.
+
# 0.3.19 (May 12, 2023)
* Fix counting reset streams when triggered by a GOAWAY.
diff --git a/vendor/h2/CONTRIBUTING.md b/vendor/h2/CONTRIBUTING.md
index 10e74bf29..8af0abcc7 100644
--- a/vendor/h2/CONTRIBUTING.md
+++ b/vendor/h2/CONTRIBUTING.md
@@ -5,7 +5,7 @@
## Getting Help ##
If you have a question about the h2 library or have encountered problems using it, you may
-[file an issue][issue] or ask ask a question on the [Tokio Gitter][gitter].
+[file an issue][issue] or ask a question on the [Tokio Gitter][gitter].
## Submitting a Pull Request ##
@@ -15,7 +15,7 @@ Do you have an improvement?
2. We will try to respond to your issue promptly.
3. Fork this repo, develop and test your code changes. See the project's [README](README.md) for further information about working in this repository.
4. Submit a pull request against this repo's `master` branch.
-6. Your branch may be merged once all configured checks pass, including:
+5. Your branch may be merged once all configured checks pass, including:
- Code review has been completed.
- The branch has passed tests in CI.
diff --git a/vendor/h2/Cargo.lock b/vendor/h2/Cargo.lock
index 9e5e36944..fb87ae3a7 100644
--- a/vendor/h2/Cargo.lock
+++ b/vendor/h2/Cargo.lock
@@ -3,28 +3,55 @@
version = 3
[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
name = "autocfg"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
-name = "bumpalo"
-version = "3.7.0"
+name = "backtrace"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
[[package]]
name = "bytes"
-version = "1.0.1"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "cc"
-version = "1.0.69"
+version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
[[package]]
name = "cfg-if"
@@ -34,14 +61,20 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "env_logger"
-version = "0.9.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"log",
]
[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -49,29 +82,28 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "futures-core"
-version = "0.3.16"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99"
+checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
[[package]]
name = "futures-sink"
-version = "0.3.16"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53"
+checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
[[package]]
name = "futures-task"
-version = "0.3.16"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2"
+checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
[[package]]
name = "futures-util"
-version = "0.3.16"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78"
+checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
dependencies = [
- "autocfg",
"futures-core",
"futures-task",
"pin-project-lite",
@@ -80,9 +112,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.6"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"libc",
@@ -90,8 +122,14 @@ dependencies = [
]
[[package]]
+name = "gimli"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
+
+[[package]]
name = "h2"
-version = "0.3.19"
+version = "0.3.22"
dependencies = [
"bytes",
"env_logger",
@@ -117,18 +155,15 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.11.2"
+version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
[[package]]
name = "hermit-abi"
-version = "0.1.19"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
-dependencies = [
- "libc",
-]
+checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
[[package]]
name = "hex"
@@ -138,9 +173,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "http"
-version = "0.2.4"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
"bytes",
"fnv",
@@ -149,108 +184,88 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "1.7.0"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
+checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897"
dependencies = [
- "autocfg",
+ "equivalent",
"hashbrown",
]
[[package]]
name = "itoa"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
-
-[[package]]
-name = "js-sys"
-version = "0.3.53"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d"
-dependencies = [
- "wasm-bindgen",
-]
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "libc"
-version = "0.2.126"
+version = "0.2.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
+checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
[[package]]
name = "log"
-version = "0.4.14"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
-dependencies = [
- "cfg-if",
-]
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "memchr"
-version = "2.4.1"
+version = "2.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
+checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
[[package]]
-name = "mio"
-version = "0.7.13"
+name = "miniz_oxide"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
dependencies = [
- "libc",
- "log",
- "miow",
- "ntapi",
- "winapi",
+ "adler",
]
[[package]]
-name = "miow"
-version = "0.3.7"
+name = "mio"
+version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
+checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
dependencies = [
- "winapi",
+ "libc",
+ "wasi",
+ "windows-sys",
]
[[package]]
-name = "ntapi"
-version = "0.3.6"
+name = "num_cpus"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "winapi",
+ "hermit-abi",
+ "libc",
]
[[package]]
-name = "num_cpus"
-version = "1.13.0"
+name = "object"
+version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
+checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
dependencies = [
- "hermit-abi",
- "libc",
+ "memchr",
]
[[package]]
name = "once_cell"
-version = "1.8.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "pin-project-lite"
-version = "0.2.7"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]]
name = "pin-utils"
@@ -260,17 +275,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "ppv-lite86"
-version = "0.2.16"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro2"
-version = "1.0.28"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
@@ -284,9 +299,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.9"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
@@ -314,45 +329,60 @@ dependencies = [
[[package]]
name = "rand_core"
-version = "0.6.3"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "ring"
-version = "0.16.20"
+version = "0.17.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b"
dependencies = [
"cc",
+ "getrandom",
"libc",
- "once_cell",
"spin",
"untrusted",
- "web-sys",
- "winapi",
+ "windows-sys",
]
[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
name = "rustls"
-version = "0.20.6"
+version = "0.21.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033"
+checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c"
dependencies = [
"log",
"ring",
+ "rustls-webpki",
"sct",
- "webpki",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.101.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
+dependencies = [
+ "ring",
+ "untrusted",
]
[[package]]
name = "ryu"
-version = "1.0.5"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "same-file"
@@ -365,9 +395,9 @@ dependencies = [
[[package]]
name = "sct"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
dependencies = [
"ring",
"untrusted",
@@ -375,15 +405,29 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.127"
+version = "1.0.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
+checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.190"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
[[package]]
name = "serde_json"
-version = "1.0.66"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [
"itoa",
"ryu",
@@ -392,49 +436,62 @@ dependencies = [
[[package]]
name = "slab"
-version = "0.4.4"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
[[package]]
name = "spin"
-version = "0.5.2"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "syn"
-version = "1.0.74"
+version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
+checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [
"proc-macro2",
"quote",
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
name = "tokio"
-version = "1.10.0"
+version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b"
+checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [
- "autocfg",
+ "backtrace",
"bytes",
"libc",
- "memchr",
"mio",
"num_cpus",
"pin-project-lite",
+ "socket2",
"tokio-macros",
- "winapi",
+ "windows-sys",
]
[[package]]
name = "tokio-macros"
-version = "1.3.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110"
+checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
"proc-macro2",
"quote",
@@ -443,20 +500,19 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.23.4"
+version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
+checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
"rustls",
"tokio",
- "webpki",
]
[[package]]
name = "tokio-util"
-version = "0.7.2"
+version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c"
+checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
dependencies = [
"bytes",
"futures-core",
@@ -468,175 +524,150 @@ dependencies = [
[[package]]
name = "tracing"
-version = "0.1.26"
+version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
- "cfg-if",
"pin-project-lite",
- "tracing-attributes",
"tracing-core",
]
[[package]]
-name = "tracing-attributes"
-version = "0.1.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "tracing-core"
-version = "0.1.26"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [
- "lazy_static",
+ "once_cell",
]
[[package]]
-name = "unicode-xid"
-version = "0.2.2"
+name = "unicode-ident"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "untrusted"
-version = "0.7.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "walkdir"
-version = "2.3.2"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file",
- "winapi",
"winapi-util",
]
[[package]]
name = "wasi"
-version = "0.10.2+wasi-snapshot-preview1"
+version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-name = "wasm-bindgen"
-version = "0.2.76"
+name = "webpki-roots"
+version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0"
-dependencies = [
- "cfg-if",
- "wasm-bindgen-macro",
-]
+checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.76"
+name = "winapi"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
- "bumpalo",
- "lazy_static",
- "log",
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-shared",
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
]
[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.76"
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef"
-dependencies = [
- "quote",
- "wasm-bindgen-macro-support",
-]
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.76"
+name = "winapi-util"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-backend",
- "wasm-bindgen-shared",
+ "winapi",
]
[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.76"
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
-name = "web-sys"
-version = "0.3.53"
+name = "windows-sys"
+version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "js-sys",
- "wasm-bindgen",
+ "windows-targets",
]
[[package]]
-name = "webpki"
-version = "0.22.0"
+name = "windows-targets"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "ring",
- "untrusted",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
-name = "webpki-roots"
-version = "0.22.3"
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf"
-dependencies = [
- "webpki",
-]
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
-name = "winapi"
-version = "0.3.9"
+name = "windows_aarch64_msvc"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
-dependencies = [
- "winapi-i686-pc-windows-gnu",
- "winapi-x86_64-pc-windows-gnu",
-]
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
-name = "winapi-i686-pc-windows-gnu"
-version = "0.4.0"
+name = "windows_i686_gnu"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
-name = "winapi-util"
-version = "0.1.5"
+name = "windows_i686_msvc"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
-dependencies = [
- "winapi",
-]
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
-name = "winapi-x86_64-pc-windows-gnu"
-version = "0.4.0"
+name = "windows_x86_64_gnu"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
diff --git a/vendor/h2/Cargo.toml b/vendor/h2/Cargo.toml
index 280139578..e4e902950 100644
--- a/vendor/h2/Cargo.toml
+++ b/vendor/h2/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2018"
-rust-version = "1.56"
+rust-version = "1.63"
name = "h2"
-version = "0.3.19"
+version = "0.3.22"
authors = [
"Carl Lerche <me@carllerche.com>",
"Sean McArthur <sean@seanmonstar.com>",
@@ -63,7 +63,7 @@ default-features = false
version = "0.2"
[dependencies.indexmap]
-version = "1.5.2"
+version = "2"
features = ["std"]
[dependencies.slab]
@@ -75,15 +75,18 @@ features = ["io-util"]
[dependencies.tokio-util]
version = "0.7.1"
-features = ["codec"]
+features = [
+ "codec",
+ "io",
+]
[dependencies.tracing]
-version = "0.1.21"
+version = "0.1.35"
features = ["std"]
default-features = false
[dev-dependencies.env_logger]
-version = "0.9"
+version = "0.10"
default-features = false
[dev-dependencies.hex]
@@ -112,13 +115,13 @@ features = [
]
[dev-dependencies.tokio-rustls]
-version = "0.23.2"
+version = "0.24"
[dev-dependencies.walkdir]
version = "2.3.2"
[dev-dependencies.webpki-roots]
-version = "0.22.2"
+version = "0.25"
[features]
stream = []
diff --git a/vendor/h2/examples/akamai.rs b/vendor/h2/examples/akamai.rs
index 1d0b17baf..788bf3005 100644
--- a/vendor/h2/examples/akamai.rs
+++ b/vendor/h2/examples/akamai.rs
@@ -17,7 +17,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
let tls_client_config = std::sync::Arc::new({
let mut root_store = RootCertStore::empty();
- root_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
+ root_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,
diff --git a/vendor/h2/src/client.rs b/vendor/h2/src/client.rs
index 4147e8a46..35cfc1414 100644
--- a/vendor/h2/src/client.rs
+++ b/vendor/h2/src/client.rs
@@ -510,8 +510,10 @@ where
self.inner
.send_request(request, end_of_stream, self.pending.as_ref())
.map_err(Into::into)
- .map(|stream| {
- if stream.is_pending_open() {
+ .map(|(stream, is_full)| {
+ if stream.is_pending_open() && is_full {
+ // Only prevent sending another request when the request queue
+ // is not full.
self.pending = Some(stream.clone_to_opaque());
}
@@ -1021,7 +1023,7 @@ impl Builder {
/// stream have been written to the connection, the send buffer capacity
/// will be freed up again.
///
- /// The default is currently ~400MB, but may change.
+ /// The default is currently ~400KB, but may change.
///
/// # Panics
///
@@ -1070,6 +1072,39 @@ impl Builder {
self
}
+ /// Sets the header table size.
+ ///
+ /// This setting informs the peer of the maximum size of the header compression
+ /// table used to encode header blocks, in octets. The encoder may select any value
+ /// equal to or less than the header table size specified by the sender.
+ ///
+ /// The default value is 4,096.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// # use tokio::io::{AsyncRead, AsyncWrite};
+ /// # use h2::client::*;
+ /// # use bytes::Bytes;
+ /// #
+ /// # async fn doc<T: AsyncRead + AsyncWrite + Unpin>(my_io: T)
+ /// # -> Result<((SendRequest<Bytes>, Connection<T, Bytes>)), h2::Error>
+ /// # {
+ /// // `client_fut` is a future representing the completion of the HTTP/2
+ /// // handshake.
+ /// let client_fut = Builder::new()
+ /// .header_table_size(1_000_000)
+ /// .handshake(my_io);
+ /// # client_fut.await
+ /// # }
+ /// #
+ /// # pub fn main() {}
+ /// ```
+ pub fn header_table_size(&mut self, size: u32) -> &mut Self {
+ self.settings.set_header_table_size(Some(size));
+ self
+ }
+
/// Sets the first stream ID to something other than 1.
#[cfg(feature = "unstable")]
pub fn initial_stream_id(&mut self, stream_id: u32) -> &mut Self {
diff --git a/vendor/h2/src/codec/framed_read.rs b/vendor/h2/src/codec/framed_read.rs
index a874d7732..3b0030d93 100644
--- a/vendor/h2/src/codec/framed_read.rs
+++ b/vendor/h2/src/codec/framed_read.rs
@@ -88,6 +88,12 @@ impl<T> FramedRead<T> {
pub fn set_max_header_list_size(&mut self, val: usize) {
self.max_header_list_size = val;
}
+
+ /// Update the header table size setting.
+ #[inline]
+ pub fn set_header_table_size(&mut self, val: usize) {
+ self.hpack.queue_size_update(val);
+ }
}
/// Decodes a frame.
diff --git a/vendor/h2/src/codec/framed_write.rs b/vendor/h2/src/codec/framed_write.rs
index 4b1b4accc..c88af02da 100644
--- a/vendor/h2/src/codec/framed_write.rs
+++ b/vendor/h2/src/codec/framed_write.rs
@@ -7,8 +7,9 @@ use bytes::{Buf, BufMut, BytesMut};
use std::pin::Pin;
use std::task::{Context, Poll};
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
+use tokio_util::io::poll_write_buf;
-use std::io::{self, Cursor, IoSlice};
+use std::io::{self, Cursor};
// A macro to get around a method needing to borrow &mut self
macro_rules! limited_write_buf {
@@ -45,8 +46,11 @@ struct Encoder<B> {
/// Max frame size, this is specified by the peer
max_frame_size: FrameSize,
- /// Whether or not the wrapped `AsyncWrite` supports vectored IO.
- is_write_vectored: bool,
+ /// Chain payloads bigger than this.
+ chain_threshold: usize,
+
+ /// Min buffer required to attempt to write a frame
+ min_buffer_capacity: usize,
}
#[derive(Debug)]
@@ -61,14 +65,16 @@ enum Next<B> {
/// frame that big.
const DEFAULT_BUFFER_CAPACITY: usize = 16 * 1_024;
-/// Min buffer required to attempt to write a frame
-const MIN_BUFFER_CAPACITY: usize = frame::HEADER_LEN + CHAIN_THRESHOLD;
-
-/// Chain payloads bigger than this. The remote will never advertise a max frame
-/// size less than this (well, the spec says the max frame size can't be less
-/// than 16kb, so not even close).
+/// Chain payloads bigger than this when vectored I/O is enabled. The remote
+/// will never advertise a max frame size less than this (well, the spec says
+/// the max frame size can't be less than 16kb, so not even close).
const CHAIN_THRESHOLD: usize = 256;
+/// Chain payloads bigger than this when vectored I/O is **not** enabled.
+/// A larger value in this scenario will reduce the number of small and
+/// fragmented data being sent, and hereby improve the throughput.
+const CHAIN_THRESHOLD_WITHOUT_VECTORED_IO: usize = 1024;
+
// TODO: Make generic
impl<T, B> FramedWrite<T, B>
where
@@ -76,7 +82,11 @@ where
B: Buf,
{
pub fn new(inner: T) -> FramedWrite<T, B> {
- let is_write_vectored = inner.is_write_vectored();
+ let chain_threshold = if inner.is_write_vectored() {
+ CHAIN_THRESHOLD
+ } else {
+ CHAIN_THRESHOLD_WITHOUT_VECTORED_IO
+ };
FramedWrite {
inner,
encoder: Encoder {
@@ -85,7 +95,8 @@ where
next: None,
last_data_frame: None,
max_frame_size: frame::DEFAULT_MAX_FRAME_SIZE,
- is_write_vectored,
+ chain_threshold,
+ min_buffer_capacity: chain_threshold + frame::HEADER_LEN,
},
}
}
@@ -126,23 +137,17 @@ where
Some(Next::Data(ref mut frame)) => {
tracing::trace!(queued_data_frame = true);
let mut buf = (&mut self.encoder.buf).chain(frame.payload_mut());
- ready!(write(
- &mut self.inner,
- self.encoder.is_write_vectored,
- &mut buf,
- cx,
- ))?
+ ready!(poll_write_buf(Pin::new(&mut self.inner), cx, &mut buf))?
}
_ => {
tracing::trace!(queued_data_frame = false);
- ready!(write(
- &mut self.inner,
- self.encoder.is_write_vectored,
- &mut self.encoder.buf,
+ ready!(poll_write_buf(
+ Pin::new(&mut self.inner),
cx,
+ &mut self.encoder.buf
))?
}
- }
+ };
}
match self.encoder.unset_frame() {
@@ -165,30 +170,6 @@ where
}
}
-fn write<T, B>(
- writer: &mut T,
- is_write_vectored: bool,
- buf: &mut B,
- cx: &mut Context<'_>,
-) -> Poll<io::Result<()>>
-where
- T: AsyncWrite + Unpin,
- B: Buf,
-{
- // TODO(eliza): when tokio-util 0.5.1 is released, this
- // could just use `poll_write_buf`...
- const MAX_IOVS: usize = 64;
- let n = if is_write_vectored {
- let mut bufs = [IoSlice::new(&[]); MAX_IOVS];
- let cnt = buf.chunks_vectored(&mut bufs);
- ready!(Pin::new(writer).poll_write_vectored(cx, &bufs[..cnt]))?
- } else {
- ready!(Pin::new(writer).poll_write(cx, buf.chunk()))?
- };
- buf.advance(n);
- Ok(()).into()
-}
-
#[must_use]
enum ControlFlow {
Continue,
@@ -240,12 +221,17 @@ where
return Err(PayloadTooBig);
}
- if len >= CHAIN_THRESHOLD {
+ if len >= self.chain_threshold {
let head = v.head();
// Encode the frame head to the buffer
head.encode(len, self.buf.get_mut());
+ if self.buf.get_ref().remaining() < self.chain_threshold {
+ let extra_bytes = self.chain_threshold - self.buf.remaining();
+ self.buf.get_mut().put(v.payload_mut().take(extra_bytes));
+ }
+
// Save the data frame
self.next = Some(Next::Data(v));
} else {
@@ -305,7 +291,9 @@ where
}
fn has_capacity(&self) -> bool {
- self.next.is_none() && self.buf.get_ref().remaining_mut() >= MIN_BUFFER_CAPACITY
+ self.next.is_none()
+ && (self.buf.get_ref().capacity() - self.buf.get_ref().len()
+ >= self.min_buffer_capacity)
}
fn is_empty(&self) -> bool {
diff --git a/vendor/h2/src/codec/mod.rs b/vendor/h2/src/codec/mod.rs
index 359adf6e4..6cbdc1e18 100644
--- a/vendor/h2/src/codec/mod.rs
+++ b/vendor/h2/src/codec/mod.rs
@@ -95,6 +95,11 @@ impl<T, B> Codec<T, B> {
self.framed_write().set_header_table_size(val)
}
+ /// Set the decoder header table size size.
+ pub fn set_recv_header_table_size(&mut self, val: usize) {
+ self.inner.set_header_table_size(val)
+ }
+
/// Set the max header list size that can be received.
pub fn set_max_recv_header_list_size(&mut self, val: usize) {
self.inner.set_max_header_list_size(val);
diff --git a/vendor/h2/src/frame/data.rs b/vendor/h2/src/frame/data.rs
index d0cdf5f69..5ed3c31b5 100644
--- a/vendor/h2/src/frame/data.rs
+++ b/vendor/h2/src/frame/data.rs
@@ -148,7 +148,7 @@ impl<T: Buf> Data<T> {
///
/// Panics if `dst` cannot contain the data frame.
pub(crate) fn encode_chunk<U: BufMut>(&mut self, dst: &mut U) {
- let len = self.data.remaining() as usize;
+ let len = self.data.remaining();
assert!(dst.remaining_mut() >= len);
diff --git a/vendor/h2/src/frame/mod.rs b/vendor/h2/src/frame/mod.rs
index 570a162a8..0e8e7035c 100644
--- a/vendor/h2/src/frame/mod.rs
+++ b/vendor/h2/src/frame/mod.rs
@@ -69,7 +69,7 @@ pub use crate::hpack::BytesStr;
pub use self::settings::{
DEFAULT_INITIAL_WINDOW_SIZE, DEFAULT_MAX_FRAME_SIZE, DEFAULT_SETTINGS_HEADER_TABLE_SIZE,
- MAX_INITIAL_WINDOW_SIZE, MAX_MAX_FRAME_SIZE,
+ MAX_MAX_FRAME_SIZE,
};
pub type FrameSize = u32;
diff --git a/vendor/h2/src/frame/settings.rs b/vendor/h2/src/frame/settings.rs
index 0c913f059..484498a9d 100644
--- a/vendor/h2/src/frame/settings.rs
+++ b/vendor/h2/src/frame/settings.rs
@@ -121,11 +121,9 @@ impl Settings {
self.header_table_size
}
- /*
pub fn set_header_table_size(&mut self, size: Option<u32>) {
self.header_table_size = size;
}
- */
pub fn load(head: Head, payload: &[u8]) -> Result<Settings, Error> {
use self::Setting::*;
diff --git a/vendor/h2/src/hpack/decoder.rs b/vendor/h2/src/hpack/decoder.rs
index b45c37927..960cbb143 100644
--- a/vendor/h2/src/hpack/decoder.rs
+++ b/vendor/h2/src/hpack/decoder.rs
@@ -447,7 +447,7 @@ fn decode_int<B: Buf>(buf: &mut B, prefix_size: u8) -> Result<usize, DecoderErro
Err(DecoderError::NeedMore(NeedMore::IntegerUnderflow))
}
-fn peek_u8<B: Buf>(buf: &mut B) -> Option<u8> {
+fn peek_u8<B: Buf>(buf: &B) -> Option<u8> {
if buf.has_remaining() {
Some(buf.chunk()[0])
} else {
@@ -835,9 +835,9 @@ mod test {
fn test_peek_u8() {
let b = 0xff;
let mut buf = Cursor::new(vec![b]);
- assert_eq!(peek_u8(&mut buf), Some(b));
+ assert_eq!(peek_u8(&buf), Some(b));
assert_eq!(buf.get_u8(), b);
- assert_eq!(peek_u8(&mut buf), None);
+ assert_eq!(peek_u8(&buf), None);
}
#[test]
diff --git a/vendor/h2/src/hpack/table.rs b/vendor/h2/src/hpack/table.rs
index a1a780451..3e45f413b 100644
--- a/vendor/h2/src/hpack/table.rs
+++ b/vendor/h2/src/hpack/table.rs
@@ -319,7 +319,7 @@ impl Table {
let mut probe = probe + 1;
probe_loop!(probe < self.indices.len(), {
- let pos = &mut self.indices[probe as usize];
+ let pos = &mut self.indices[probe];
prev = match mem::replace(pos, Some(prev)) {
Some(p) => p,
@@ -656,12 +656,12 @@ fn to_raw_capacity(n: usize) -> usize {
#[inline]
fn desired_pos(mask: usize, hash: HashValue) -> usize {
- (hash.0 & mask) as usize
+ hash.0 & mask
}
#[inline]
fn probe_distance(mask: usize, hash: HashValue, current: usize) -> usize {
- current.wrapping_sub(desired_pos(mask, hash)) & mask as usize
+ current.wrapping_sub(desired_pos(mask, hash)) & mask
}
fn hash_header(header: &Header) -> HashValue {
diff --git a/vendor/h2/src/hpack/test/fixture.rs b/vendor/h2/src/hpack/test/fixture.rs
index 0d33ca2de..d3f76e3bf 100644
--- a/vendor/h2/src/hpack/test/fixture.rs
+++ b/vendor/h2/src/hpack/test/fixture.rs
@@ -100,7 +100,7 @@ fn test_story(story: Value) {
let mut input: Vec<_> = case
.expect
.iter()
- .map(|&(ref name, ref value)| {
+ .map(|(name, value)| {
Header::new(name.clone().into(), value.clone().into())
.unwrap()
.into()
diff --git a/vendor/h2/src/lib.rs b/vendor/h2/src/lib.rs
index 830147113..a1fde6eb4 100644
--- a/vendor/h2/src/lib.rs
+++ b/vendor/h2/src/lib.rs
@@ -78,10 +78,15 @@
//! [`server::handshake`]: server/fn.handshake.html
//! [`client::handshake`]: client/fn.handshake.html
-#![doc(html_root_url = "https://docs.rs/h2/0.3.19")]
-#![deny(missing_debug_implementations, missing_docs)]
-#![cfg_attr(test, deny(warnings))]
+#![doc(html_root_url = "https://docs.rs/h2/0.3.22")]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ clippy::missing_safety_doc,
+ clippy::undocumented_unsafe_blocks
+)]
#![allow(clippy::type_complexity, clippy::manual_range_contains)]
+#![cfg_attr(test, deny(warnings))]
macro_rules! proto_err {
(conn: $($msg:tt)+) => {
diff --git a/vendor/h2/src/proto/connection.rs b/vendor/h2/src/proto/connection.rs
index 727643a65..637fac358 100644
--- a/vendor/h2/src/proto/connection.rs
+++ b/vendor/h2/src/proto/connection.rs
@@ -145,7 +145,9 @@ where
/// connection flow control
pub(crate) fn set_target_window_size(&mut self, size: WindowSize) {
- self.inner.streams.set_target_connection_window_size(size);
+ let _res = self.inner.streams.set_target_connection_window_size(size);
+ // TODO: proper error handling
+ debug_assert!(_res.is_ok());
}
/// Send a new SETTINGS frame with an updated initial window size.
diff --git a/vendor/h2/src/proto/mod.rs b/vendor/h2/src/proto/mod.rs
index d71ee9c42..567d03060 100644
--- a/vendor/h2/src/proto/mod.rs
+++ b/vendor/h2/src/proto/mod.rs
@@ -30,7 +30,7 @@ pub type PingPayload = [u8; 8];
pub type WindowSize = u32;
// Constants
-pub const MAX_WINDOW_SIZE: WindowSize = (1 << 31) - 1;
+pub const MAX_WINDOW_SIZE: WindowSize = (1 << 31) - 1; // i32::MAX as u32
pub const DEFAULT_REMOTE_RESET_STREAM_MAX: usize = 20;
pub const DEFAULT_RESET_STREAM_MAX: usize = 10;
pub const DEFAULT_RESET_STREAM_SECS: u64 = 30;
diff --git a/vendor/h2/src/proto/settings.rs b/vendor/h2/src/proto/settings.rs
index 6cc617209..28065cc68 100644
--- a/vendor/h2/src/proto/settings.rs
+++ b/vendor/h2/src/proto/settings.rs
@@ -60,6 +60,10 @@ impl Settings {
codec.set_max_recv_header_list_size(max as usize);
}
+ if let Some(val) = local.header_table_size() {
+ codec.set_recv_header_table_size(val as usize);
+ }
+
streams.apply_local_settings(local)?;
self.local = Local::Synced;
Ok(())
diff --git a/vendor/h2/src/proto/streams/counts.rs b/vendor/h2/src/proto/streams/counts.rs
index 6a5aa9ccd..add1312e5 100644
--- a/vendor/h2/src/proto/streams/counts.rs
+++ b/vendor/h2/src/proto/streams/counts.rs
@@ -49,6 +49,14 @@ impl Counts {
}
}
+ /// Returns true when the next opened stream will reach capacity of outbound streams
+ ///
+ /// The number of client send streams is incremented in prioritize; send_request has to guess if
+ /// it should wait before allowing another request to be sent.
+ pub fn next_send_stream_will_reach_capacity(&self) -> bool {
+ self.max_send_streams <= (self.num_send_streams + 1)
+ }
+
/// Returns the current peer
pub fn peer(&self) -> peer::Dyn {
self.peer
diff --git a/vendor/h2/src/proto/streams/flow_control.rs b/vendor/h2/src/proto/streams/flow_control.rs
index 73a7754db..57a935825 100644
--- a/vendor/h2/src/proto/streams/flow_control.rs
+++ b/vendor/h2/src/proto/streams/flow_control.rs
@@ -75,12 +75,12 @@ impl FlowControl {
self.window_size > self.available
}
- pub fn claim_capacity(&mut self, capacity: WindowSize) {
- self.available -= capacity;
+ pub fn claim_capacity(&mut self, capacity: WindowSize) -> Result<(), Reason> {
+ self.available.decrease_by(capacity)
}
- pub fn assign_capacity(&mut self, capacity: WindowSize) {
- self.available += capacity;
+ pub fn assign_capacity(&mut self, capacity: WindowSize) -> Result<(), Reason> {
+ self.available.increase_by(capacity)
}
/// If a WINDOW_UPDATE frame should be sent, returns a positive number
@@ -136,22 +136,23 @@ impl FlowControl {
///
/// This is called after receiving a SETTINGS frame with a lower
/// INITIAL_WINDOW_SIZE value.
- pub fn dec_send_window(&mut self, sz: WindowSize) {
+ pub fn dec_send_window(&mut self, sz: WindowSize) -> Result<(), Reason> {
tracing::trace!(
"dec_window; sz={}; window={}, available={}",
sz,
self.window_size,
self.available
);
- // This should not be able to overflow `window_size` from the bottom.
- self.window_size -= sz;
+ // ~~This should not be able to overflow `window_size` from the bottom.~~ wrong. it can.
+ self.window_size.decrease_by(sz)?;
+ Ok(())
}
/// Decrement the recv-side window size.
///
/// This is called after receiving a SETTINGS ACK frame with a lower
/// INITIAL_WINDOW_SIZE value.
- pub fn dec_recv_window(&mut self, sz: WindowSize) {
+ pub fn dec_recv_window(&mut self, sz: WindowSize) -> Result<(), Reason> {
tracing::trace!(
"dec_recv_window; sz={}; window={}, available={}",
sz,
@@ -159,13 +160,14 @@ impl FlowControl {
self.available
);
// This should not be able to overflow `window_size` from the bottom.
- self.window_size -= sz;
- self.available -= sz;
+ self.window_size.decrease_by(sz)?;
+ self.available.decrease_by(sz)?;
+ Ok(())
}
/// Decrements the window reflecting data has actually been sent. The caller
/// must ensure that the window has capacity.
- pub fn send_data(&mut self, sz: WindowSize) {
+ pub fn send_data(&mut self, sz: WindowSize) -> Result<(), Reason> {
tracing::trace!(
"send_data; sz={}; window={}; available={}",
sz,
@@ -176,12 +178,13 @@ impl FlowControl {
// If send size is zero it's meaningless to update flow control window
if sz > 0 {
// Ensure that the argument is correct
- assert!(self.window_size >= sz as usize);
+ assert!(self.window_size.0 >= sz as i32);
// Update values
- self.window_size -= sz;
- self.available -= sz;
+ self.window_size.decrease_by(sz)?;
+ self.available.decrease_by(sz)?;
}
+ Ok(())
}
}
@@ -208,6 +211,29 @@ impl Window {
assert!(self.0 >= 0, "negative Window");
self.0 as WindowSize
}
+
+ pub fn decrease_by(&mut self, other: WindowSize) -> Result<(), Reason> {
+ if let Some(v) = self.0.checked_sub(other as i32) {
+ self.0 = v;
+ Ok(())
+ } else {
+ Err(Reason::FLOW_CONTROL_ERROR)
+ }
+ }
+
+ pub fn increase_by(&mut self, other: WindowSize) -> Result<(), Reason> {
+ let other = self.add(other)?;
+ self.0 = other.0;
+ Ok(())
+ }
+
+ pub fn add(&self, other: WindowSize) -> Result<Self, Reason> {
+ if let Some(v) = self.0.checked_add(other as i32) {
+ Ok(Self(v))
+ } else {
+ Err(Reason::FLOW_CONTROL_ERROR)
+ }
+ }
}
impl PartialEq<usize> for Window {
@@ -230,25 +256,6 @@ impl PartialOrd<usize> for Window {
}
}
-impl ::std::ops::SubAssign<WindowSize> for Window {
- fn sub_assign(&mut self, other: WindowSize) {
- self.0 -= other as i32;
- }
-}
-
-impl ::std::ops::Add<WindowSize> for Window {
- type Output = Self;
- fn add(self, other: WindowSize) -> Self::Output {
- Window(self.0 + other as i32)
- }
-}
-
-impl ::std::ops::AddAssign<WindowSize> for Window {
- fn add_assign(&mut self, other: WindowSize) {
- self.0 += other as i32;
- }
-}
-
impl fmt::Display for Window {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
diff --git a/vendor/h2/src/proto/streams/prioritize.rs b/vendor/h2/src/proto/streams/prioritize.rs
index 88204ddcc..3196049a4 100644
--- a/vendor/h2/src/proto/streams/prioritize.rs
+++ b/vendor/h2/src/proto/streams/prioritize.rs
@@ -87,7 +87,9 @@ impl Prioritize {
flow.inc_window(config.remote_init_window_sz)
.expect("invalid initial window size");
- flow.assign_capacity(config.remote_init_window_sz);
+ // TODO: proper error handling
+ let _res = flow.assign_capacity(config.remote_init_window_sz);
+ debug_assert!(_res.is_ok());
tracing::trace!("Prioritize::new; flow={:?}", flow);
@@ -253,7 +255,9 @@ impl Prioritize {
if available as usize > capacity {
let diff = available - capacity as WindowSize;
- stream.send_flow.claim_capacity(diff);
+ // TODO: proper error handling
+ let _res = stream.send_flow.claim_capacity(diff);
+ debug_assert!(_res.is_ok());
self.assign_connection_capacity(diff, stream, counts);
}
@@ -324,7 +328,9 @@ impl Prioritize {
pub fn reclaim_all_capacity(&mut self, stream: &mut store::Ptr, counts: &mut Counts) {
let available = stream.send_flow.available().as_size();
if available > 0 {
- stream.send_flow.claim_capacity(available);
+ // TODO: proper error handling
+ let _res = stream.send_flow.claim_capacity(available);
+ debug_assert!(_res.is_ok());
// Re-assign all capacity to the connection
self.assign_connection_capacity(available, stream, counts);
}
@@ -337,7 +343,9 @@ impl Prioritize {
if stream.requested_send_capacity as usize > stream.buffered_send_data {
let reserved = stream.requested_send_capacity - stream.buffered_send_data as WindowSize;
- stream.send_flow.claim_capacity(reserved);
+ // TODO: proper error handling
+ let _res = stream.send_flow.claim_capacity(reserved);
+ debug_assert!(_res.is_ok());
self.assign_connection_capacity(reserved, stream, counts);
}
}
@@ -363,7 +371,9 @@ impl Prioritize {
let span = tracing::trace_span!("assign_connection_capacity", inc);
let _e = span.enter();
- self.flow.assign_capacity(inc);
+ // TODO: proper error handling
+ let _res = self.flow.assign_capacity(inc);
+ debug_assert!(_res.is_ok());
// Assign newly acquired capacity to streams pending capacity.
while self.flow.available() > 0 {
@@ -443,7 +453,9 @@ impl Prioritize {
stream.assign_capacity(assign, self.max_buffer_size);
// Claim the capacity from the connection
- self.flow.claim_capacity(assign);
+ // TODO: proper error handling
+ let _res = self.flow.claim_capacity(assign);
+ debug_assert!(_res.is_ok());
}
tracing::trace!(
@@ -508,7 +520,9 @@ impl Prioritize {
tracing::trace!("poll_complete");
loop {
- self.schedule_pending_open(store, counts);
+ if let Some(mut stream) = self.pop_pending_open(store, counts) {
+ self.pending_send.push_front(&mut stream);
+ }
match self.pop_frame(buffer, store, max_frame_len, counts) {
Some(frame) => {
@@ -763,12 +777,16 @@ impl Prioritize {
// Assign the capacity back to the connection that
// was just consumed from the stream in the previous
// line.
- self.flow.assign_capacity(len);
+ // TODO: proper error handling
+ let _res = self.flow.assign_capacity(len);
+ debug_assert!(_res.is_ok());
});
let (eos, len) = tracing::trace_span!("updating connection flow")
.in_scope(|| {
- self.flow.send_data(len);
+ // TODO: proper error handling
+ let _res = self.flow.send_data(len);
+ debug_assert!(_res.is_ok());
// Wrap the frame's data payload to ensure that the
// correct amount of data gets written.
@@ -858,20 +876,24 @@ impl Prioritize {
}
}
- fn schedule_pending_open(&mut self, store: &mut Store, counts: &mut Counts) {
+ fn pop_pending_open<'s>(
+ &mut self,
+ store: &'s mut Store,
+ counts: &mut Counts,
+ ) -> Option<store::Ptr<'s>> {
tracing::trace!("schedule_pending_open");
// check for any pending open streams
- while counts.can_inc_num_send_streams() {
+ if counts.can_inc_num_send_streams() {
if let Some(mut stream) = self.pending_open.pop(store) {
tracing::trace!("schedule_pending_open; stream={:?}", stream.id);
counts.inc_num_send_streams(&mut stream);
- self.pending_send.push(&mut stream);
stream.notify_send();
- } else {
- return;
+ return Some(stream);
}
}
+
+ None
}
}
diff --git a/vendor/h2/src/proto/streams/recv.rs b/vendor/h2/src/proto/streams/recv.rs
index 8c7267a9d..0063942a4 100644
--- a/vendor/h2/src/proto/streams/recv.rs
+++ b/vendor/h2/src/proto/streams/recv.rs
@@ -90,7 +90,7 @@ impl Recv {
// settings
flow.inc_window(DEFAULT_INITIAL_WINDOW_SIZE)
.expect("invalid initial remote window size");
- flow.assign_capacity(DEFAULT_INITIAL_WINDOW_SIZE);
+ flow.assign_capacity(DEFAULT_INITIAL_WINDOW_SIZE).unwrap();
Recv {
init_window_sz: config.local_init_window_sz,
@@ -229,6 +229,11 @@ impl Recv {
return Err(Error::library_reset(stream.id, Reason::PROTOCOL_ERROR).into());
}
+ if pseudo.status.is_some() && counts.peer().is_server() {
+ proto_err!(stream: "cannot use :status header for requests; stream={:?}", stream.id);
+ return Err(Error::library_reset(stream.id, Reason::PROTOCOL_ERROR).into());
+ }
+
if !pseudo.is_informational() {
let message = counts
.peer()
@@ -239,12 +244,14 @@ impl Recv {
.pending_recv
.push_back(&mut self.buffer, Event::Headers(message));
stream.notify_recv();
- }
- // Only servers can receive a headers frame that initiates the stream.
- // This is verified in `Streams` before calling this function.
- if counts.peer().is_server() {
- self.pending_accept.push(stream);
+ // Only servers can receive a headers frame that initiates the stream.
+ // This is verified in `Streams` before calling this function.
+ if counts.peer().is_server() {
+ // Correctness: never push a stream to `pending_accept` without having the
+ // corresponding headers frame pushed to `stream.pending_recv`.
+ self.pending_accept.push(stream);
+ }
}
Ok(())
@@ -252,13 +259,16 @@ impl Recv {
/// Called by the server to get the request
///
- /// TODO: Should this fn return `Result`?
+ /// # Panics
+ ///
+ /// Panics if `stream.pending_recv` has no `Event::Headers` queued.
+ ///
pub fn take_request(&mut self, stream: &mut store::Ptr) -> Request<()> {
use super::peer::PollMessage::*;
match stream.pending_recv.pop_front(&mut self.buffer) {
Some(Event::Headers(Server(request))) => request,
- _ => panic!(),
+ _ => unreachable!("server stream queue must start with Headers"),
}
}
@@ -308,7 +318,13 @@ impl Recv {
Some(Event::Headers(Client(response))) => Poll::Ready(Ok(response)),
Some(_) => panic!("poll_response called after response returned"),
None => {
- stream.state.ensure_recv_open()?;
+ if !stream.state.ensure_recv_open()? {
+ proto_err!(stream: "poll_response: stream={:?} is not opened;", stream.id);
+ return Poll::Ready(Err(Error::library_reset(
+ stream.id,
+ Reason::PROTOCOL_ERROR,
+ )));
+ }
stream.recv_task = Some(cx.waker().clone());
Poll::Pending
@@ -353,7 +369,9 @@ impl Recv {
self.in_flight_data -= capacity;
// Assign capacity to connection
- self.flow.assign_capacity(capacity);
+ // TODO: proper error handling
+ let _res = self.flow.assign_capacity(capacity);
+ debug_assert!(_res.is_ok());
if self.flow.unclaimed_capacity().is_some() {
if let Some(task) = task.take() {
@@ -381,7 +399,9 @@ impl Recv {
stream.in_flight_recv_data -= capacity;
// Assign capacity to stream
- stream.recv_flow.assign_capacity(capacity);
+ // TODO: proper error handling
+ let _res = stream.recv_flow.assign_capacity(capacity);
+ debug_assert!(_res.is_ok());
if stream.recv_flow.unclaimed_capacity().is_some() {
// Queue the stream for sending the WINDOW_UPDATE frame.
@@ -427,7 +447,11 @@ impl Recv {
///
/// The `task` is an optional parked task for the `Connection` that might
/// be blocked on needing more window capacity.
- pub fn set_target_connection_window(&mut self, target: WindowSize, task: &mut Option<Waker>) {
+ pub fn set_target_connection_window(
+ &mut self,
+ target: WindowSize,
+ task: &mut Option<Waker>,
+ ) -> Result<(), Reason> {
tracing::trace!(
"set_target_connection_window; target={}; available={}, reserved={}",
target,
@@ -440,11 +464,15 @@ impl Recv {
//
// Update the flow controller with the difference between the new
// target and the current target.
- let current = (self.flow.available() + self.in_flight_data).checked_size();
+ let current = self
+ .flow
+ .available()
+ .add(self.in_flight_data)?
+ .checked_size();
if target > current {
- self.flow.assign_capacity(target - current);
+ self.flow.assign_capacity(target - current)?;
} else {
- self.flow.claim_capacity(current - target);
+ self.flow.claim_capacity(current - target)?;
}
// If changing the target capacity means we gained a bunch of capacity,
@@ -455,6 +483,7 @@ impl Recv {
task.wake();
}
}
+ Ok(())
}
pub(crate) fn apply_local_settings(
@@ -494,9 +523,13 @@ impl Recv {
let dec = old_sz - target;
tracing::trace!("decrementing all windows; dec={}", dec);
- store.for_each(|mut stream| {
- stream.recv_flow.dec_recv_window(dec);
- })
+ store.try_for_each(|mut stream| {
+ stream
+ .recv_flow
+ .dec_recv_window(dec)
+ .map_err(proto::Error::library_go_away)?;
+ Ok::<_, proto::Error>(())
+ })?;
}
Ordering::Greater => {
// We must increase the (local) window on every open stream.
@@ -509,7 +542,10 @@ impl Recv {
.recv_flow
.inc_window(inc)
.map_err(proto::Error::library_go_away)?;
- stream.recv_flow.assign_capacity(inc);
+ stream
+ .recv_flow
+ .assign_capacity(inc)
+ .map_err(proto::Error::library_go_away)?;
Ok::<_, proto::Error>(())
})?;
}
@@ -616,7 +652,10 @@ impl Recv {
}
// Update stream level flow control
- stream.recv_flow.send_data(sz);
+ stream
+ .recv_flow
+ .send_data(sz)
+ .map_err(proto::Error::library_go_away)?;
// Track the data as in-flight
stream.in_flight_recv_data += sz;
@@ -657,7 +696,7 @@ impl Recv {
}
// Update connection level flow control
- self.flow.send_data(sz);
+ self.flow.send_data(sz).map_err(Error::library_go_away)?;
// Track the data as in-flight
self.in_flight_data += sz;
@@ -859,15 +898,6 @@ impl Recv {
tracing::trace!("enqueue_reset_expiration; {:?}", stream.id);
- if !counts.can_inc_num_reset_streams() {
- // try to evict 1 stream if possible
- // if max allow is 0, this won't be able to evict,
- // and then we'll just bail after
- if let Some(evicted) = self.pending_reset_expired.pop(stream.store_mut()) {
- counts.transition_after(evicted, true);
- }
- }
-
if counts.can_inc_num_reset_streams() {
counts.inc_num_reset_streams();
self.pending_reset_expired.push(stream);
diff --git a/vendor/h2/src/proto/streams/send.rs b/vendor/h2/src/proto/streams/send.rs
index 20aba38d4..626e61a33 100644
--- a/vendor/h2/src/proto/streams/send.rs
+++ b/vendor/h2/src/proto/streams/send.rs
@@ -4,7 +4,7 @@ use super::{
};
use crate::codec::UserError;
use crate::frame::{self, Reason};
-use crate::proto::{Error, Initiator};
+use crate::proto::{self, Error, Initiator};
use bytes::Buf;
use tokio::io::AsyncWrite;
@@ -143,22 +143,27 @@ impl Send {
// Update the state
stream.state.send_open(end_stream)?;
- if counts.peer().is_local_init(frame.stream_id()) {
- // If we're waiting on a PushPromise anyway
- // handle potentially queueing the stream at that point
- if !stream.is_pending_push {
- if counts.can_inc_num_send_streams() {
- counts.inc_num_send_streams(stream);
- } else {
- self.prioritize.queue_open(stream);
- }
- }
+ let mut pending_open = false;
+ if counts.peer().is_local_init(frame.stream_id()) && !stream.is_pending_push {
+ self.prioritize.queue_open(stream);
+ pending_open = true;
}
// Queue the frame for sending
+ //
+ // This call expects that, since new streams are in the open queue, new
+ // streams won't be pushed on pending_send.
self.prioritize
.queue_frame(frame.into(), buffer, stream, task);
+ // Need to notify the connection when pushing onto pending_open since
+ // queue_frame only notifies for pending_send.
+ if pending_open {
+ if let Some(task) = task.take() {
+ task.wake();
+ }
+ }
+
Ok(())
}
@@ -458,10 +463,21 @@ impl Send {
tracing::trace!("decrementing all windows; dec={}", dec);
let mut total_reclaimed = 0;
- store.for_each(|mut stream| {
+ store.try_for_each(|mut stream| {
let stream = &mut *stream;
- stream.send_flow.dec_send_window(dec);
+ tracing::trace!(
+ "decrementing stream window; id={:?}; decr={}; flow={:?}",
+ stream.id,
+ dec,
+ stream.send_flow
+ );
+
+ // TODO: this decrement can underflow based on received frames!
+ stream
+ .send_flow
+ .dec_send_window(dec)
+ .map_err(proto::Error::library_go_away)?;
// It's possible that decreasing the window causes
// `window_size` (the stream-specific window) to fall below
@@ -474,7 +490,10 @@ impl Send {
let reclaimed = if available > window_size {
// Drop down to `window_size`.
let reclaim = available - window_size;
- stream.send_flow.claim_capacity(reclaim);
+ stream
+ .send_flow
+ .claim_capacity(reclaim)
+ .map_err(proto::Error::library_go_away)?;
total_reclaimed += reclaim;
reclaim
} else {
@@ -492,7 +511,9 @@ impl Send {
// TODO: Should this notify the producer when the capacity
// of a stream is reduced? Maybe it should if the capacity
// is reduced to zero, allowing the producer to stop work.
- });
+
+ Ok::<_, proto::Error>(())
+ })?;
self.prioritize
.assign_connection_capacity(total_reclaimed, store, counts);
diff --git a/vendor/h2/src/proto/streams/state.rs b/vendor/h2/src/proto/streams/state.rs
index 6f89b34c5..5256f09cf 100644
--- a/vendor/h2/src/proto/streams/state.rs
+++ b/vendor/h2/src/proto/streams/state.rs
@@ -64,8 +64,9 @@ enum Inner {
Closed(Cause),
}
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Copy, Clone, Default)]
enum Peer {
+ #[default]
AwaitingHeaders,
Streaming,
}
@@ -361,10 +362,10 @@ impl State {
}
pub fn is_remote_reset(&self) -> bool {
- match self.inner {
- Closed(Cause::Error(Error::Reset(_, _, Initiator::Remote))) => true,
- _ => false,
- }
+ matches!(
+ self.inner,
+ Closed(Cause::Error(Error::Reset(_, _, Initiator::Remote)))
+ )
}
/// Returns true if the stream is already reset.
@@ -466,9 +467,3 @@ impl Default for State {
State { inner: Inner::Idle }
}
}
-
-impl Default for Peer {
- fn default() -> Self {
- AwaitingHeaders
- }
-}
diff --git a/vendor/h2/src/proto/streams/store.rs b/vendor/h2/src/proto/streams/store.rs
index d33a01cce..67b377b12 100644
--- a/vendor/h2/src/proto/streams/store.rs
+++ b/vendor/h2/src/proto/streams/store.rs
@@ -256,7 +256,7 @@ where
///
/// If the stream is already contained by the list, return `false`.
pub fn push(&mut self, stream: &mut store::Ptr) -> bool {
- tracing::trace!("Queue::push");
+ tracing::trace!("Queue::push_back");
if N::is_queued(stream) {
tracing::trace!(" -> already queued");
@@ -292,6 +292,46 @@ where
true
}
+ /// Queue the stream
+ ///
+ /// If the stream is already contained by the list, return `false`.
+ pub fn push_front(&mut self, stream: &mut store::Ptr) -> bool {
+ tracing::trace!("Queue::push_front");
+
+ if N::is_queued(stream) {
+ tracing::trace!(" -> already queued");
+ return false;
+ }
+
+ N::set_queued(stream, true);
+
+ // The next pointer shouldn't be set
+ debug_assert!(N::next(stream).is_none());
+
+ // Queue the stream
+ match self.indices {
+ Some(ref mut idxs) => {
+ tracing::trace!(" -> existing entries");
+
+ // Update the provided stream to point to the head node
+ let head_key = stream.resolve(idxs.head).key();
+ N::set_next(stream, Some(head_key));
+
+ // Update the head pointer
+ idxs.head = stream.key();
+ }
+ None => {
+ tracing::trace!(" -> first entry");
+ self.indices = Some(store::Indices {
+ head: stream.key(),
+ tail: stream.key(),
+ });
+ }
+ }
+
+ true
+ }
+
pub fn pop<'a, R>(&mut self, store: &'a mut R) -> Option<store::Ptr<'a>>
where
R: Resolve,
diff --git a/vendor/h2/src/proto/streams/stream.rs b/vendor/h2/src/proto/streams/stream.rs
index 2888d744b..43e313647 100644
--- a/vendor/h2/src/proto/streams/stream.rs
+++ b/vendor/h2/src/proto/streams/stream.rs
@@ -146,7 +146,9 @@ impl Stream {
recv_flow
.inc_window(init_recv_window)
.expect("invalid initial receive window");
- recv_flow.assign_capacity(init_recv_window);
+ // TODO: proper error handling?
+ let _res = recv_flow.assign_capacity(init_recv_window);
+ debug_assert!(_res.is_ok());
send_flow
.inc_window(init_send_window)
@@ -275,7 +277,9 @@ impl Stream {
pub fn assign_capacity(&mut self, capacity: WindowSize, max_buffer_size: usize) {
let prev_capacity = self.capacity(max_buffer_size);
debug_assert!(capacity > 0);
- self.send_flow.assign_capacity(capacity);
+ // TODO: proper error handling
+ let _res = self.send_flow.assign_capacity(capacity);
+ debug_assert!(_res.is_ok());
tracing::trace!(
" assigned capacity to stream; available={}; buffered={}; id={:?}; max_buffer_size={} prev={}",
@@ -294,7 +298,9 @@ impl Stream {
pub fn send_data(&mut self, len: WindowSize, max_buffer_size: usize) {
let prev_capacity = self.capacity(max_buffer_size);
- self.send_flow.send_data(len);
+ // TODO: proper error handling
+ let _res = self.send_flow.send_data(len);
+ debug_assert!(_res.is_ok());
// Decrement the stream's buffered data counter
debug_assert!(self.buffered_send_data >= len as usize);
diff --git a/vendor/h2/src/proto/streams/streams.rs b/vendor/h2/src/proto/streams/streams.rs
index dfc5c768b..274bf4553 100644
--- a/vendor/h2/src/proto/streams/streams.rs
+++ b/vendor/h2/src/proto/streams/streams.rs
@@ -118,7 +118,7 @@ where
}
}
- pub fn set_target_connection_window_size(&mut self, size: WindowSize) {
+ pub fn set_target_connection_window_size(&mut self, size: WindowSize) -> Result<(), Reason> {
let mut me = self.inner.lock().unwrap();
let me = &mut *me;
@@ -216,7 +216,7 @@ where
mut request: Request<()>,
end_of_stream: bool,
pending: Option<&OpaqueStreamRef>,
- ) -> Result<StreamRef<B>, SendError> {
+ ) -> Result<(StreamRef<B>, bool), SendError> {
use super::stream::ContentLength;
use http::Method;
@@ -298,10 +298,14 @@ where
// the lock, so it can't.
me.refs += 1;
- Ok(StreamRef {
- opaque: OpaqueStreamRef::new(self.inner.clone(), &mut stream),
- send_buffer: self.send_buffer.clone(),
- })
+ let is_full = me.counts.next_send_stream_will_reach_capacity();
+ Ok((
+ StreamRef {
+ opaque: OpaqueStreamRef::new(self.inner.clone(), &mut stream),
+ send_buffer: self.send_buffer.clone(),
+ },
+ is_full,
+ ))
}
pub(crate) fn is_extended_connect_protocol_enabled(&self) -> bool {
@@ -726,7 +730,11 @@ impl Inner {
}
// The stream must be receive open
- stream.state.ensure_recv_open()?;
+ if !stream.state.ensure_recv_open()? {
+ proto_err!(conn: "recv_push_promise: initiating stream is not opened");
+ return Err(Error::library_go_away(Reason::PROTOCOL_ERROR));
+ }
+
stream.key()
}
None => {
diff --git a/vendor/h2/src/server.rs b/vendor/h2/src/server.rs
index f1f4cf470..bb20adc5d 100644
--- a/vendor/h2/src/server.rs
+++ b/vendor/h2/src/server.rs
@@ -937,7 +937,7 @@ impl Builder {
/// stream have been written to the connection, the send buffer capacity
/// will be freed up again.
///
- /// The default is currently ~400MB, but may change.
+ /// The default is currently ~400KB, but may change.
///
/// # Panics
///