httpunk 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {httpunk-0.1.2 → httpunk-0.1.4}/Cargo.lock +42 -41
- {httpunk-0.1.2 → httpunk-0.1.4}/Cargo.toml +3 -3
- {httpunk-0.1.2 → httpunk-0.1.4}/PKG-INFO +2 -2
- httpunk-0.1.4/crates/vendor-h2/UPSTREAM_VERSION +1 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/headers.rs +22 -11
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/encoder.rs +23 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/header.rs +2 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/huffman/mod.rs +121 -57
- httpunk-0.1.4/crates/vendor-h2/src/hpack/huffman/table.rs +589 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/proto/streams/state.rs +24 -8
- httpunk-0.1.4/crates/vendor-hyper/UPSTREAM_VERSION +1 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/body/length.rs +1 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/common/date.rs +4 -4
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/ext/mod.rs +1 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/headers.rs +6 -8
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/decode.rs +8 -15
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/encode.rs +28 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/role.rs +82 -60
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/_backend/tonio.py +7 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h1/client.py +65 -12
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h1/connection.py +36 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h1/server.py +2 -4
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h1/share.py +15 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/client.py +15 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/connection.py +118 -3
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/server.py +10 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/share.py +10 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/stream.py +1 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/streams.py +138 -31
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/types.py +12 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/pool.py +15 -11
- {httpunk-0.1.2 → httpunk-0.1.4}/pyproject.toml +2 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_flow.py +71 -2
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_server.py +83 -0
- httpunk-0.1.2/crates/vendor-h2/UPSTREAM_VERSION +0 -1
- httpunk-0.1.2/crates/vendor-h2/src/hpack/huffman/table.rs +0 -5130
- httpunk-0.1.2/crates/vendor-hyper/UPSTREAM_VERSION +0 -1
- {httpunk-0.1.2 → httpunk-0.1.4}/LICENSE +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/README.md +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/Cargo.toml +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/LICENSE +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/codec/error.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/codec/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/ext.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/data.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/go_away.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/head.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/ping.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/priority.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/reason.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/reset.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/settings.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/stream_id.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/util.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/frame/window_update.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/decoder.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/hpack/table.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/lib.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/proto/error.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/proto/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/proto/streams/flow_control.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-h2/src/proto/streams/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/Cargo.toml +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/LICENSE +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/body/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/cfg.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/common/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/error.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/ext/h1_reason_phrase.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/ext/informational.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/lib.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/httpunk.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/io.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/h1/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/proto/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper/src/trace.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/Cargo.toml +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/LICENSE +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/UPSTREAM_VERSION +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/src/client/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/src/client/proxy/matcher.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/src/client/proxy/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/crates/vendor-hyper-util/src/lib.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/__init__.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/_backend/__init__.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/_backend/asyncio.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/_common.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/_httpunk.pyi +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/asyncio.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/exceptions.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h1/__init__.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/__init__.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/h2/settings.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/http.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/py.typed +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/__init__.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/auto.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/client.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/graceful.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/httpunk/util/proxy.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/errors.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/h1/codec.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/h1/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/h2/codec.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/h2/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/h2/streams.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/http/mod.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/lib.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/src/proxy.rs +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/_client.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/conftest.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_asyncio_backend.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_asyncio_client_protocol.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_asyncio_e2e.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_asyncio_protocol.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_backend.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h1_codec.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h1_conn.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h1_decode.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h1_server.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_codec.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_conn.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_errors.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_flow_control.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_ready.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_settings.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_h2_state.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_headermap.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_auto.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_connect.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_graceful.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_pool.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_proxy.py +0 -0
- {httpunk-0.1.2 → httpunk-0.1.4}/tests/test_util_tls.py +0 -0
|
@@ -34,30 +34,30 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
34
34
|
|
|
35
35
|
[[package]]
|
|
36
36
|
name = "futures-channel"
|
|
37
|
-
version = "0.3.
|
|
37
|
+
version = "0.3.34"
|
|
38
38
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
-
checksum = "
|
|
39
|
+
checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
|
|
40
40
|
dependencies = [
|
|
41
41
|
"futures-core",
|
|
42
42
|
]
|
|
43
43
|
|
|
44
44
|
[[package]]
|
|
45
45
|
name = "futures-core"
|
|
46
|
-
version = "0.3.
|
|
46
|
+
version = "0.3.34"
|
|
47
47
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
-
checksum = "
|
|
48
|
+
checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
|
|
49
49
|
|
|
50
50
|
[[package]]
|
|
51
51
|
name = "futures-sink"
|
|
52
|
-
version = "0.3.
|
|
52
|
+
version = "0.3.34"
|
|
53
53
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
-
checksum = "
|
|
54
|
+
checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "h2"
|
|
58
|
-
version = "0.4.
|
|
58
|
+
version = "0.4.16"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
60
|
+
checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27"
|
|
61
61
|
dependencies = [
|
|
62
62
|
"atomic-waker",
|
|
63
63
|
"bytes",
|
|
@@ -86,9 +86,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
86
86
|
|
|
87
87
|
[[package]]
|
|
88
88
|
name = "http"
|
|
89
|
-
version = "1.
|
|
89
|
+
version = "1.5.0"
|
|
90
90
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
91
|
-
checksum = "
|
|
91
|
+
checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
|
|
92
92
|
dependencies = [
|
|
93
93
|
"bytes",
|
|
94
94
|
"itoa",
|
|
@@ -96,9 +96,9 @@ dependencies = [
|
|
|
96
96
|
|
|
97
97
|
[[package]]
|
|
98
98
|
name = "http-body"
|
|
99
|
-
version = "1.0
|
|
99
|
+
version = "1.1.0"
|
|
100
100
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
|
-
checksum = "
|
|
101
|
+
checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"
|
|
102
102
|
dependencies = [
|
|
103
103
|
"bytes",
|
|
104
104
|
"http",
|
|
@@ -118,7 +118,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
|
|
118
118
|
|
|
119
119
|
[[package]]
|
|
120
120
|
name = "httpunk"
|
|
121
|
-
version = "0.1.
|
|
121
|
+
version = "0.1.4"
|
|
122
122
|
dependencies = [
|
|
123
123
|
"bytes",
|
|
124
124
|
"h2",
|
|
@@ -132,9 +132,9 @@ dependencies = [
|
|
|
132
132
|
|
|
133
133
|
[[package]]
|
|
134
134
|
name = "hyper"
|
|
135
|
-
version = "1.
|
|
135
|
+
version = "1.11.0"
|
|
136
136
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
-
checksum = "
|
|
137
|
+
checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72"
|
|
138
138
|
dependencies = [
|
|
139
139
|
"atomic-waker",
|
|
140
140
|
"bytes",
|
|
@@ -163,9 +163,9 @@ dependencies = [
|
|
|
163
163
|
|
|
164
164
|
[[package]]
|
|
165
165
|
name = "ipnet"
|
|
166
|
-
version = "2.12.
|
|
166
|
+
version = "2.12.1"
|
|
167
167
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
168
|
-
checksum = "
|
|
168
|
+
checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78"
|
|
169
169
|
|
|
170
170
|
[[package]]
|
|
171
171
|
name = "itoa"
|
|
@@ -175,9 +175,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
175
175
|
|
|
176
176
|
[[package]]
|
|
177
177
|
name = "libc"
|
|
178
|
-
version = "0.2.
|
|
178
|
+
version = "0.2.189"
|
|
179
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
180
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
181
181
|
|
|
182
182
|
[[package]]
|
|
183
183
|
name = "once_cell"
|
|
@@ -199,24 +199,24 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
|
199
199
|
|
|
200
200
|
[[package]]
|
|
201
201
|
name = "portable-atomic"
|
|
202
|
-
version = "1.
|
|
202
|
+
version = "1.15.0"
|
|
203
203
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
204
|
-
checksum = "
|
|
204
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
205
205
|
|
|
206
206
|
[[package]]
|
|
207
207
|
name = "proc-macro2"
|
|
208
|
-
version = "1.0.
|
|
208
|
+
version = "1.0.107"
|
|
209
209
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
-
checksum = "
|
|
210
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
211
211
|
dependencies = [
|
|
212
212
|
"unicode-ident",
|
|
213
213
|
]
|
|
214
214
|
|
|
215
215
|
[[package]]
|
|
216
216
|
name = "pyo3"
|
|
217
|
-
version = "0.29.
|
|
217
|
+
version = "0.29.2"
|
|
218
218
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
-
checksum = "
|
|
219
|
+
checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
|
|
220
220
|
dependencies = [
|
|
221
221
|
"libc",
|
|
222
222
|
"once_cell",
|
|
@@ -228,18 +228,18 @@ dependencies = [
|
|
|
228
228
|
|
|
229
229
|
[[package]]
|
|
230
230
|
name = "pyo3-build-config"
|
|
231
|
-
version = "0.29.
|
|
231
|
+
version = "0.29.2"
|
|
232
232
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
233
|
-
checksum = "
|
|
233
|
+
checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
|
|
234
234
|
dependencies = [
|
|
235
235
|
"target-lexicon",
|
|
236
236
|
]
|
|
237
237
|
|
|
238
238
|
[[package]]
|
|
239
239
|
name = "pyo3-ffi"
|
|
240
|
-
version = "0.29.
|
|
240
|
+
version = "0.29.2"
|
|
241
241
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
242
|
-
checksum = "
|
|
242
|
+
checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
|
|
243
243
|
dependencies = [
|
|
244
244
|
"libc",
|
|
245
245
|
"pyo3-build-config",
|
|
@@ -247,9 +247,9 @@ dependencies = [
|
|
|
247
247
|
|
|
248
248
|
[[package]]
|
|
249
249
|
name = "pyo3-macros"
|
|
250
|
-
version = "0.29.
|
|
250
|
+
version = "0.29.2"
|
|
251
251
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
|
-
checksum = "
|
|
252
|
+
checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
|
|
253
253
|
dependencies = [
|
|
254
254
|
"proc-macro2",
|
|
255
255
|
"pyo3-macros-backend",
|
|
@@ -259,9 +259,9 @@ dependencies = [
|
|
|
259
259
|
|
|
260
260
|
[[package]]
|
|
261
261
|
name = "pyo3-macros-backend"
|
|
262
|
-
version = "0.29.
|
|
262
|
+
version = "0.29.2"
|
|
263
263
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
264
|
-
checksum = "
|
|
264
|
+
checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
|
|
265
265
|
dependencies = [
|
|
266
266
|
"heck",
|
|
267
267
|
"proc-macro2",
|
|
@@ -271,9 +271,9 @@ dependencies = [
|
|
|
271
271
|
|
|
272
272
|
[[package]]
|
|
273
273
|
name = "quote"
|
|
274
|
-
version = "1.0.
|
|
274
|
+
version = "1.0.47"
|
|
275
275
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
276
|
-
checksum = "
|
|
276
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
277
277
|
dependencies = [
|
|
278
278
|
"proc-macro2",
|
|
279
279
|
]
|
|
@@ -292,9 +292,9 @@ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
|
|
|
292
292
|
|
|
293
293
|
[[package]]
|
|
294
294
|
name = "syn"
|
|
295
|
-
version = "2.0.
|
|
295
|
+
version = "2.0.119"
|
|
296
296
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
297
|
-
checksum = "
|
|
297
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
298
298
|
dependencies = [
|
|
299
299
|
"proc-macro2",
|
|
300
300
|
"quote",
|
|
@@ -309,9 +309,9 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
|
309
309
|
|
|
310
310
|
[[package]]
|
|
311
311
|
name = "tokio"
|
|
312
|
-
version = "1.
|
|
312
|
+
version = "1.53.1"
|
|
313
313
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
314
|
-
checksum = "
|
|
314
|
+
checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
|
|
315
315
|
dependencies = [
|
|
316
316
|
"bytes",
|
|
317
317
|
"pin-project-lite",
|
|
@@ -319,13 +319,14 @@ dependencies = [
|
|
|
319
319
|
|
|
320
320
|
[[package]]
|
|
321
321
|
name = "tokio-util"
|
|
322
|
-
version = "0.7.
|
|
322
|
+
version = "0.7.19"
|
|
323
323
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
324
|
-
checksum = "
|
|
324
|
+
checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
|
|
325
325
|
dependencies = [
|
|
326
326
|
"bytes",
|
|
327
327
|
"futures-core",
|
|
328
328
|
"futures-sink",
|
|
329
|
+
"libc",
|
|
329
330
|
"pin-project-lite",
|
|
330
331
|
"tokio",
|
|
331
332
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "httpunk"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.4"
|
|
4
4
|
description = "The Rust HTTP library for Python"
|
|
5
5
|
authors = [
|
|
6
6
|
"Giovanni Barillari <g@baro.dev>",
|
|
@@ -60,8 +60,8 @@ vendor-hyper-util = { path = "crates/vendor-hyper-util" }
|
|
|
60
60
|
# THIRD-PARTY.md). Optional + gated behind the never-enabled `_audit` feature so
|
|
61
61
|
# the pinned versions land in Cargo.lock for `cargo audit` / Dependabot advisory
|
|
62
62
|
# coverage without pulling them (and tokio) into the build.
|
|
63
|
-
h2 = { version = "=0.4.
|
|
64
|
-
hyper = { version = "=1.
|
|
63
|
+
h2 = { version = "=0.4.16", optional = true }
|
|
64
|
+
hyper = { version = "=1.11.0", optional = true, default-features = false, features = ["http1", "client", "server"] }
|
|
65
65
|
|
|
66
66
|
[profile.release]
|
|
67
67
|
codegen-units = 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: httpunk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Rust
|
|
21
21
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
22
|
-
Requires-Dist: tonio~=0.
|
|
22
|
+
Requires-Dist: tonio~=0.9.7 ; python_full_version >= '3.14' and extra == 'tonio'
|
|
23
23
|
Provides-Extra: tonio
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
Summary: The Rust HTTP library for Python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.4.16
|
|
@@ -6,7 +6,7 @@ use crate::hpack::{self, BytesStr};
|
|
|
6
6
|
use http::header::{self, HeaderName, HeaderValue};
|
|
7
7
|
use http::{uri, HeaderMap, Method, Request, StatusCode, Uri};
|
|
8
8
|
|
|
9
|
-
use bytes::{Buf, BufMut,
|
|
9
|
+
use bytes::{Buf, BufMut, BytesMut};
|
|
10
10
|
|
|
11
11
|
use std::fmt;
|
|
12
12
|
use std::io::Cursor;
|
|
@@ -104,7 +104,7 @@ struct HeaderBlock {
|
|
|
104
104
|
|
|
105
105
|
#[derive(Debug)]
|
|
106
106
|
struct EncodingHeaderBlock {
|
|
107
|
-
hpack:
|
|
107
|
+
hpack: BytesMut,
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const END_STREAM: u8 = 0x1;
|
|
@@ -287,7 +287,7 @@ impl Headers {
|
|
|
287
287
|
|
|
288
288
|
self.header_block
|
|
289
289
|
.into_encoding(encoder)
|
|
290
|
-
.encode(&head, dst, |_| {})
|
|
290
|
+
.encode(&head, dst, Some(encoder), |_| {})
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
fn head(&self) -> Head {
|
|
@@ -508,7 +508,7 @@ impl PushPromise {
|
|
|
508
508
|
|
|
509
509
|
self.header_block
|
|
510
510
|
.into_encoding(encoder)
|
|
511
|
-
.encode(&head, dst, |dst| {
|
|
511
|
+
.encode(&head, dst, Some(encoder), |dst| {
|
|
512
512
|
dst.put_u32(promised_id.into());
|
|
513
513
|
})
|
|
514
514
|
}
|
|
@@ -551,7 +551,7 @@ impl Continuation {
|
|
|
551
551
|
// Get the CONTINUATION frame head
|
|
552
552
|
let head = self.head();
|
|
553
553
|
|
|
554
|
-
self.header_block.encode(&head, dst, |_| {})
|
|
554
|
+
self.header_block.encode(&head, dst, None, |_| {})
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
|
|
@@ -647,7 +647,13 @@ impl Pseudo {
|
|
|
647
647
|
// ===== impl EncodingHeaderBlock =====
|
|
648
648
|
|
|
649
649
|
impl EncodingHeaderBlock {
|
|
650
|
-
fn encode<F>(
|
|
650
|
+
fn encode<F>(
|
|
651
|
+
mut self,
|
|
652
|
+
head: &Head,
|
|
653
|
+
dst: &mut EncodeBuf<'_>,
|
|
654
|
+
encoder: Option<&mut hpack::Encoder>,
|
|
655
|
+
f: F,
|
|
656
|
+
) -> Option<Continuation>
|
|
651
657
|
where
|
|
652
658
|
F: FnOnce(&mut EncodeBuf<'_>),
|
|
653
659
|
{
|
|
@@ -664,7 +670,8 @@ impl EncodingHeaderBlock {
|
|
|
664
670
|
|
|
665
671
|
// Now, encode the header payload
|
|
666
672
|
let continuation = if self.hpack.len() > dst.remaining_mut() {
|
|
667
|
-
|
|
673
|
+
let head_part = self.hpack.split_to(dst.remaining_mut());
|
|
674
|
+
dst.put_slice(&head_part);
|
|
668
675
|
|
|
669
676
|
Some(Continuation {
|
|
670
677
|
stream_id: head.stream_id(),
|
|
@@ -672,6 +679,11 @@ impl EncodingHeaderBlock {
|
|
|
672
679
|
})
|
|
673
680
|
} else {
|
|
674
681
|
dst.put_slice(&self.hpack);
|
|
682
|
+
// The block is fully written, so the buffer can be reused by the
|
|
683
|
+
// next frame on this connection.
|
|
684
|
+
if let Some(encoder) = encoder {
|
|
685
|
+
encoder.return_scratch(self.hpack);
|
|
686
|
+
}
|
|
675
687
|
|
|
676
688
|
None
|
|
677
689
|
};
|
|
@@ -978,7 +990,8 @@ impl HeaderBlock {
|
|
|
978
990
|
}
|
|
979
991
|
|
|
980
992
|
fn into_encoding(self, encoder: &mut hpack::Encoder) -> EncodingHeaderBlock {
|
|
981
|
-
let mut hpack =
|
|
993
|
+
let mut hpack = encoder.take_scratch();
|
|
994
|
+
hpack.clear();
|
|
982
995
|
let headers = Iter {
|
|
983
996
|
pseudo: Some(self.pseudo),
|
|
984
997
|
fields: self.fields.into_iter(),
|
|
@@ -986,9 +999,7 @@ impl HeaderBlock {
|
|
|
986
999
|
|
|
987
1000
|
encoder.encode(headers, &mut hpack);
|
|
988
1001
|
|
|
989
|
-
EncodingHeaderBlock {
|
|
990
|
-
hpack: hpack.freeze(),
|
|
991
|
-
}
|
|
1002
|
+
EncodingHeaderBlock { hpack }
|
|
992
1003
|
}
|
|
993
1004
|
|
|
994
1005
|
/// Calculates the size of the currently decoded header list.
|
|
@@ -8,6 +8,13 @@ use http::header::{HeaderName, HeaderValue};
|
|
|
8
8
|
pub struct Encoder {
|
|
9
9
|
table: Table,
|
|
10
10
|
size_update: Option<SizeUpdate>,
|
|
11
|
+
/// Reusable buffer for the encoded header block of a single frame.
|
|
12
|
+
///
|
|
13
|
+
/// A header block only has to live until it is copied into the
|
|
14
|
+
/// connection write buffer, so the buffer that holds it can be reused
|
|
15
|
+
/// across frames instead of being allocated and freed per frame. See
|
|
16
|
+
/// `take_scratch` / `return_scratch`.
|
|
17
|
+
scratch: BytesMut,
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
|
@@ -21,9 +28,25 @@ impl Encoder {
|
|
|
21
28
|
Encoder {
|
|
22
29
|
table: Table::new(max_size, capacity),
|
|
23
30
|
size_update: None,
|
|
31
|
+
scratch: BytesMut::new(),
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
|
|
35
|
+
/// Takes the reusable buffer for one header-block encode.
|
|
36
|
+
///
|
|
37
|
+
/// The buffer is returned by `return_scratch` once the encoded block has
|
|
38
|
+
/// been copied into the write buffer. If it is not returned - the
|
|
39
|
+
/// CONTINUATION path keeps it, since the remainder is still needed - the
|
|
40
|
+
/// next call simply starts from a fresh buffer.
|
|
41
|
+
pub fn take_scratch(&mut self) -> BytesMut {
|
|
42
|
+
std::mem::take(&mut self.scratch)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/// Returns a fully-written header block buffer for reuse.
|
|
46
|
+
pub fn return_scratch(&mut self, scratch: BytesMut) {
|
|
47
|
+
self.scratch = scratch;
|
|
48
|
+
}
|
|
49
|
+
|
|
27
50
|
/// Queues a max size update.
|
|
28
51
|
///
|
|
29
52
|
/// The next call to `encode` will include a dynamic size update frame.
|
|
@@ -96,7 +96,7 @@ impl Header {
|
|
|
96
96
|
} else {
|
|
97
97
|
// HTTP/2 requires lower case header names
|
|
98
98
|
let name = HeaderName::from_lowercase(&name)?;
|
|
99
|
-
let value = HeaderValue::
|
|
99
|
+
let value = HeaderValue::from_bytes(&value)?;
|
|
100
100
|
|
|
101
101
|
Ok(Header::Field { name, value })
|
|
102
102
|
}
|
|
@@ -231,7 +231,7 @@ impl<'a> Name<'a> {
|
|
|
231
231
|
match self {
|
|
232
232
|
Name::Field(name) => Ok(Header::Field {
|
|
233
233
|
name: name.clone(),
|
|
234
|
-
value: HeaderValue::
|
|
234
|
+
value: HeaderValue::from_bytes(&value)?,
|
|
235
235
|
}),
|
|
236
236
|
Name::Authority => Ok(Header::Authority(BytesStr::try_from(value)?)),
|
|
237
237
|
Name::Method => Ok(Header::Method(Method::from_bytes(&value)?)),
|
|
@@ -5,39 +5,70 @@ use crate::hpack::DecoderError;
|
|
|
5
5
|
|
|
6
6
|
use bytes::{BufMut, BytesMut};
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
maybe_eos: bool,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// These flags must match the ones in genhuff.rs
|
|
15
|
-
|
|
16
|
-
const MAYBE_EOS: u8 = 1;
|
|
17
|
-
const DECODED: u8 = 2;
|
|
18
|
-
const ERROR: u8 = 4;
|
|
8
|
+
const BRANCH: u16 = 0x8000;
|
|
9
|
+
const TABLE_INDEX_MASK: u16 = 0x7f00;
|
|
10
|
+
const TABLE_WIDTH: usize = 256;
|
|
19
11
|
|
|
20
12
|
pub fn decode(src: &[u8], buf: &mut BytesMut) -> Result<BytesMut, DecoderError> {
|
|
21
|
-
let mut decoder = Decoder::new();
|
|
22
|
-
|
|
23
13
|
// Max compression ratio is >= 0.5
|
|
24
14
|
buf.reserve(src.len() << 1);
|
|
25
15
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
let mut table = 0;
|
|
17
|
+
let mut acc = 0u32;
|
|
18
|
+
let mut bits = 0;
|
|
19
|
+
|
|
20
|
+
for &byte in src {
|
|
21
|
+
acc = (acc << 8) | byte as u32;
|
|
22
|
+
bits += 8;
|
|
23
|
+
|
|
24
|
+
while bits >= 8 {
|
|
25
|
+
let index = (acc >> (bits - 8)) as u8 as usize;
|
|
26
|
+
let entry = DECODE_TABLE[table * TABLE_WIDTH + index];
|
|
27
|
+
|
|
28
|
+
if entry & BRANCH == 0 {
|
|
29
|
+
buf.put_u8(entry as u8);
|
|
30
|
+
table = 0;
|
|
31
|
+
bits -= (entry >> 8) as usize;
|
|
32
|
+
} else {
|
|
33
|
+
table = ((entry & TABLE_INDEX_MASK) >> 8) as usize;
|
|
34
|
+
if table == 0 {
|
|
35
|
+
return Err(DecoderError::InvalidHuffmanCode);
|
|
36
|
+
}
|
|
37
|
+
bits -= 8;
|
|
38
|
+
}
|
|
29
39
|
}
|
|
40
|
+
}
|
|
30
41
|
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
// Fewer than eight bits remain. A prefix of the EOS code (all ones) is
|
|
43
|
+
// valid padding only when the previous symbol has completed.
|
|
44
|
+
while bits > 0 {
|
|
45
|
+
debug_assert!(bits < 8);
|
|
46
|
+
let padding = (1u32 << bits) - 1;
|
|
47
|
+
if table == 0 && acc & padding == padding {
|
|
48
|
+
break;
|
|
33
49
|
}
|
|
34
|
-
}
|
|
35
50
|
|
|
36
|
-
|
|
37
|
-
|
|
51
|
+
let index = (acc << (8 - bits)) as u8 as usize;
|
|
52
|
+
let entry = DECODE_TABLE[table * TABLE_WIDTH + index];
|
|
53
|
+
if entry & BRANCH != 0 {
|
|
54
|
+
return Err(DecoderError::InvalidHuffmanCode);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let used = (entry >> 8) as usize;
|
|
58
|
+
if used > bits {
|
|
59
|
+
return Err(DecoderError::InvalidHuffmanCode);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
buf.put_u8(entry as u8);
|
|
63
|
+
table = 0;
|
|
64
|
+
bits -= used;
|
|
38
65
|
}
|
|
39
66
|
|
|
40
|
-
|
|
67
|
+
if table == 0 {
|
|
68
|
+
Ok(buf.split())
|
|
69
|
+
} else {
|
|
70
|
+
Err(DecoderError::InvalidHuffmanCode)
|
|
71
|
+
}
|
|
41
72
|
}
|
|
42
73
|
|
|
43
74
|
pub fn encode(src: &[u8], dst: &mut BytesMut) {
|
|
@@ -65,41 +96,6 @@ pub fn encode(src: &[u8], dst: &mut BytesMut) {
|
|
|
65
96
|
}
|
|
66
97
|
}
|
|
67
98
|
|
|
68
|
-
impl Decoder {
|
|
69
|
-
fn new() -> Decoder {
|
|
70
|
-
Decoder {
|
|
71
|
-
state: 0,
|
|
72
|
-
maybe_eos: false,
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Decodes 4 bits
|
|
77
|
-
fn decode4(&mut self, input: u8) -> Result<Option<u8>, DecoderError> {
|
|
78
|
-
// (next-state, byte, flags)
|
|
79
|
-
let (next, byte, flags) = DECODE_TABLE[self.state as usize][input as usize];
|
|
80
|
-
|
|
81
|
-
if flags & ERROR == ERROR {
|
|
82
|
-
// Data followed the EOS marker
|
|
83
|
-
return Err(DecoderError::InvalidHuffmanCode);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
let mut ret = None;
|
|
87
|
-
|
|
88
|
-
if flags & DECODED == DECODED {
|
|
89
|
-
ret = Some(byte);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
self.state = next;
|
|
93
|
-
self.maybe_eos = flags & MAYBE_EOS == MAYBE_EOS;
|
|
94
|
-
|
|
95
|
-
Ok(ret)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
fn is_final(&self) -> bool {
|
|
99
|
-
self.state == 0 || self.maybe_eos
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
99
|
#[cfg(test)]
|
|
104
100
|
mod test {
|
|
105
101
|
use super::*;
|
|
@@ -196,4 +192,72 @@ mod test {
|
|
|
196
192
|
assert_eq!(&decoded[..], &s[..]);
|
|
197
193
|
}
|
|
198
194
|
}
|
|
195
|
+
|
|
196
|
+
#[test]
|
|
197
|
+
fn encode_decode_all_octets() {
|
|
198
|
+
let src: Vec<_> = (0..=u8::MAX).collect();
|
|
199
|
+
let mut encoded = BytesMut::new();
|
|
200
|
+
encode(&src, &mut encoded);
|
|
201
|
+
assert_eq!(decode(&encoded).unwrap(), src);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
#[test]
|
|
205
|
+
fn rejects_eos_and_invalid_padding() {
|
|
206
|
+
assert_eq!(decode(&[0xff]), Err(DecoderError::InvalidHuffmanCode));
|
|
207
|
+
assert_eq!(
|
|
208
|
+
decode(&[0xff, 0xff, 0xff, 0xff]),
|
|
209
|
+
Err(DecoderError::InvalidHuffmanCode)
|
|
210
|
+
);
|
|
211
|
+
assert_eq!(decode(&[0]), Err(DecoderError::InvalidHuffmanCode));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/*
|
|
216
|
+
// uncomment to run benchmarks
|
|
217
|
+
#[cfg(test)]
|
|
218
|
+
mod bench {
|
|
219
|
+
extern crate test;
|
|
220
|
+
|
|
221
|
+
use self::test::{black_box, Bencher};
|
|
222
|
+
use super::*;
|
|
223
|
+
|
|
224
|
+
fn decode_input(b: &mut Bencher, input: &[u8]) {
|
|
225
|
+
let mut encoded = BytesMut::new();
|
|
226
|
+
encode(input, &mut encoded);
|
|
227
|
+
|
|
228
|
+
let mut scratch = BytesMut::with_capacity(input.len() * 2);
|
|
229
|
+
b.bytes = encoded.len() as u64;
|
|
230
|
+
b.iter(|| {
|
|
231
|
+
let decoded = decode(black_box(encoded.as_ref()), &mut scratch).unwrap();
|
|
232
|
+
black_box(decoded);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
#[bench]
|
|
237
|
+
fn decode_short_ascii(b: &mut Bencher) {
|
|
238
|
+
decode_input(b, b"www.example.com");
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
#[bench]
|
|
242
|
+
fn decode_header_value(b: &mut Bencher) {
|
|
243
|
+
decode_input(
|
|
244
|
+
b,
|
|
245
|
+
b"text/html,application/xhtml+xml,application/xml;q=0.9;q=0.8",
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
#[bench]
|
|
250
|
+
fn decode_long_ascii(b: &mut Bencher) {
|
|
251
|
+
decode_input(
|
|
252
|
+
b,
|
|
253
|
+
b"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0",
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
#[bench]
|
|
258
|
+
fn decode_all_octets(b: &mut Bencher) {
|
|
259
|
+
let input: Vec<_> = (0..=u8::MAX).collect();
|
|
260
|
+
decode_input(b, &input);
|
|
261
|
+
}
|
|
199
262
|
}
|
|
263
|
+
*/
|