chiark / gitweb /
Switch to hyper 1.x
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Feb 2025 13:02:14 +0000 (13:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Feb 2025 13:59:59 +0000 (13:59 +0000)
We need to update our minimal tokio too, to avoid a compile failure
somewhere in our dependency tree.

Cargo.lock
Cargo.lock.minimal
Cargo.toml
debian/control
maint/update-minimal-versions
server/server.rs
server/sweb.rs
src/prelude.rs
src/queue.rs

index 1151c1b607b93e7077035ce2c8a64300e473d349..7791fc667b3641b10b29d09d270eda51cc8ebdb5 100644 (file)
@@ -555,25 +555,6 @@ version = "0.31.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
 
-[[package]]
-name = "h2"
-version = "0.3.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
-dependencies = [
- "bytes",
- "fnv",
- "futures-core",
- "futures-sink",
- "futures-util",
- "http 0.2.12",
- "indexmap",
- "slab",
- "tokio",
- "tokio-util",
- "tracing",
-]
-
 [[package]]
 name = "h2"
 version = "0.4.7"
@@ -585,7 +566,7 @@ dependencies = [
  "fnv",
  "futures-core",
  "futures-sink",
- "http 1.2.0",
+ "http",
  "indexmap",
  "slab",
  "tokio",
@@ -622,9 +603,9 @@ dependencies = [
  "futures",
  "heck",
  "hippotat-macros",
- "http-body 1.0.1",
+ "http-body",
  "http-body-util",
- "hyper 0.14.32",
+ "hyper",
  "hyper-util",
  "indenter",
  "ipnet",
@@ -672,17 +653,6 @@ dependencies = [
  "windows",
 ]
 
-[[package]]
-name = "http"
-version = "0.2.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
-dependencies = [
- "bytes",
- "fnv",
- "itoa",
-]
-
 [[package]]
 name = "http"
 version = "1.2.0"
@@ -694,17 +664,6 @@ dependencies = [
  "itoa",
 ]
 
-[[package]]
-name = "http-body"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
-dependencies = [
- "bytes",
- "http 0.2.12",
- "pin-project-lite",
-]
-
 [[package]]
 name = "http-body"
 version = "1.0.1"
@@ -712,7 +671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
 dependencies = [
  "bytes",
- "http 1.2.0",
+ "http",
 ]
 
 [[package]]
@@ -723,8 +682,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
 dependencies = [
  "bytes",
  "futures-util",
- "http 1.2.0",
- "http-body 1.0.1",
+ "http",
+ "http-body",
  "pin-project-lite",
 ]
 
@@ -746,30 +705,6 @@ version = "2.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
 
-[[package]]
-name = "hyper"
-version = "0.14.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7"
-dependencies = [
- "bytes",
- "futures-channel",
- "futures-core",
- "futures-util",
- "h2 0.3.26",
- "http 0.2.12",
- "http-body 0.4.6",
- "httparse",
- "httpdate",
- "itoa",
- "pin-project-lite",
- "socket2",
- "tokio",
- "tower-service",
- "tracing",
- "want",
-]
-
 [[package]]
 name = "hyper"
 version = "1.6.0"
@@ -779,10 +714,11 @@ dependencies = [
  "bytes",
  "futures-channel",
  "futures-util",
- "h2 0.4.7",
- "http 1.2.0",
- "http-body 1.0.1",
+ "h2",
+ "http",
+ "http-body",
  "httparse",
+ "httpdate",
  "itoa",
  "pin-project-lite",
  "smallvec",
@@ -797,8 +733,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2"
 dependencies = [
  "futures-util",
- "http 1.2.0",
- "hyper 1.6.0",
+ "http",
+ "hyper",
  "hyper-util",
  "rustls",
  "rustls-pki-types",
@@ -815,7 +751,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
 dependencies = [
  "bytes",
  "http-body-util",
- "hyper 1.6.0",
+ "hyper",
  "hyper-util",
  "native-tls",
  "tokio",
@@ -832,9 +768,9 @@ dependencies = [
  "bytes",
  "futures-channel",
  "futures-util",
- "http 1.2.0",
- "http-body 1.0.1",
- "hyper 1.6.0",
+ "http",
+ "http-body",
+ "hyper",
  "pin-project-lite",
  "socket2",
  "tokio",
@@ -1352,11 +1288,11 @@ dependencies = [
  "encoding_rs",
  "futures-core",
  "futures-util",
- "h2 0.4.7",
- "http 1.2.0",
- "http-body 1.0.1",
+ "h2",
+ "http",
+ "http-body",
  "http-body-util",
- "hyper 1.6.0",
+ "hyper",
  "hyper-rustls",
  "hyper-tls",
  "hyper-util",
index fa6acbf1cdd85f8e3e66878e0b8dcd9fc17ce6ac..745a9a45798a417b6023c333426d8dbc213d981d 100644 (file)
@@ -151,15 +151,9 @@ checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187"
 
 [[package]]
 name = "bytes"
-version = "0.5.3"
+version = "1.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38"
-
-[[package]]
-name = "bytes"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72"
+checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
 
 [[package]]
 name = "c2-chacha"
@@ -592,51 +586,23 @@ checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
 
 [[package]]
 name = "h2"
-version = "0.3.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21"
-dependencies = [
- "bytes 1.0.0",
- "fnv",
- "futures-core",
- "futures-sink",
- "futures-util",
- "http 0.2.0",
- "indexmap 1.5.2",
- "slab",
- "tokio",
- "tokio-util",
- "tracing",
-]
-
-[[package]]
-name = "h2"
-version = "0.4.0"
+version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a"
+checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "fnv",
  "futures-core",
  "futures-sink",
  "futures-util",
- "http 1.0.0",
- "indexmap 2.0.0",
+ "http",
+ "indexmap",
  "slab",
  "tokio",
  "tokio-util",
  "tracing",
 ]
 
-[[package]]
-name = "hashbrown"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb"
-dependencies = [
- "autocfg 1.1.0",
-]
-
 [[package]]
 name = "hashbrown"
 version = "0.14.0"
@@ -651,9 +617,9 @@ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
 
 [[package]]
 name = "hermit-abi"
-version = "0.3.2"
+version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
 
 [[package]]
 name = "hippotat"
@@ -672,9 +638,10 @@ dependencies = [
  "futures",
  "heck",
  "hippotat-macros",
- "http-body 1.0.1",
+ "http-body",
  "http-body-util",
- "hyper 0.14.7",
+ "hyper",
+ "hyper-util",
  "indenter",
  "ipnet",
  "itertools",
@@ -685,7 +652,7 @@ dependencies = [
  "memchr",
  "mime",
  "nix",
- "parking_lot",
+ "parking_lot 0.11.0",
  "pin-project-lite",
  "regex",
  "reqwest",
@@ -721,46 +688,25 @@ dependencies = [
  "winapi",
 ]
 
-[[package]]
-name = "http"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
-dependencies = [
- "bytes 0.5.3",
- "fnv",
- "itoa 0.4.7",
-]
-
 [[package]]
 name = "http"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "fnv",
  "itoa 1.0.0",
 ]
 
-[[package]]
-name = "http-body"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994"
-dependencies = [
- "bytes 1.0.0",
- "http 0.2.0",
-]
-
 [[package]]
 name = "http-body"
 version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
 dependencies = [
- "bytes 1.0.0",
- "http 1.0.0",
+ "bytes",
+ "http",
 ]
 
 [[package]]
@@ -769,10 +715,10 @@ version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "futures-util",
- "http 1.0.0",
- "http-body 1.0.1",
+ "http",
+ "http-body",
  "pin-project-lite",
 ]
 
@@ -796,43 +742,21 @@ checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da"
 
 [[package]]
 name = "hyper"
-version = "0.14.7"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54"
+checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "futures-channel",
- "futures-core",
  "futures-util",
- "h2 0.3.18",
- "http 0.2.0",
- "http-body 0.4.0",
+ "h2",
+ "http",
+ "http-body",
  "httparse",
  "httpdate",
- "itoa 0.4.7",
- "pin-project",
- "socket2 0.4.10",
- "tokio",
- "tower-service",
- "tracing",
- "want",
-]
-
-[[package]]
-name = "hyper"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"
-dependencies = [
- "bytes 1.0.0",
- "futures-channel",
- "futures-util",
- "h2 0.4.0",
- "http 1.0.0",
- "http-body 1.0.1",
- "httparse",
  "itoa 1.0.0",
  "pin-project-lite",
+ "smallvec",
  "tokio",
  "want",
 ]
@@ -844,8 +768,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "736f15a50e749d033164c56c09783b6102c4ff8da79ad77dbddbbaea0f8567f7"
 dependencies = [
  "futures-util",
- "http 1.0.0",
- "hyper 1.1.0",
+ "http",
+ "hyper",
  "hyper-util",
  "rustls",
  "rustls-pki-types",
@@ -860,9 +784,9 @@ version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "http-body-util",
- "hyper 1.1.0",
+ "hyper",
  "hyper-util",
  "native-tls",
  "tokio",
@@ -872,20 +796,19 @@ dependencies = [
 
 [[package]]
 name = "hyper-util"
-version = "0.1.3"
+version = "0.1.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "futures-channel",
  "futures-util",
- "http 1.0.0",
- "http-body 1.0.1",
- "hyper 1.1.0",
+ "http",
+ "http-body",
+ "hyper",
  "pin-project-lite",
- "socket2 0.5.0",
+ "socket2",
  "tokio",
- "tower",
  "tower-service",
  "tracing",
 ]
@@ -906,16 +829,6 @@ version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e0bd112d44d9d870a6819eb505d04dd92b5e4d94bb8c304924a0872ae7016fb5"
 
-[[package]]
-name = "indexmap"
-version = "1.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c"
-dependencies = [
- "autocfg 1.1.0",
- "hashbrown 0.8.1",
-]
-
 [[package]]
 name = "indexmap"
 version = "2.0.0"
@@ -923,7 +836,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
 dependencies = [
  "equivalent",
- "hashbrown 0.14.0",
+ "hashbrown",
 ]
 
 [[package]]
@@ -1027,9 +940,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
 
 [[package]]
 name = "libc"
-version = "0.2.156"
+version = "0.2.168"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a"
+checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
 
 [[package]]
 name = "linux-raw-sys"
@@ -1045,9 +958,9 @@ checksum = "bb68f22743a3fb35785f1e7f844ca5a3de2dde5bd0c0ef5b372065814699b121"
 
 [[package]]
 name = "lock_api"
-version = "0.4.0"
+version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de302ce1fe7482db13738fbaf2e21cfb06a986b89c0bf38d88abf16681aada4e"
+checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
 dependencies = [
  "scopeguard",
 ]
@@ -1099,25 +1012,14 @@ dependencies = [
 
 [[package]]
 name = "mio"
-version = "0.7.6"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b"
+checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4"
 dependencies = [
+ "hermit-abi",
  "libc",
- "log",
- "miow",
- "ntapi",
- "winapi",
-]
-
-[[package]]
-name = "miow"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897"
-dependencies = [
- "socket2 0.3.16",
- "winapi",
+ "wasi",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -1152,24 +1054,6 @@ dependencies = [
  "pin-utils",
 ]
 
-[[package]]
-name = "ntapi"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcdaac6150484ca8fed0f2ba30c2970d05da1ceac10d1beefae91ff4ada7928f"
-dependencies = [
- "winapi",
-]
-
-[[package]]
-name = "num_cpus"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
-dependencies = [
- "libc",
-]
-
 [[package]]
 name = "object"
 version = "0.36.0"
@@ -1237,7 +1121,17 @@ checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
 dependencies = [
  "instant",
  "lock_api",
- "parking_lot_core",
+ "parking_lot_core 0.8.0",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
+dependencies = [
+ "lock_api",
+ "parking_lot_core 0.9.0",
 ]
 
 [[package]]
@@ -1250,36 +1144,29 @@ dependencies = [
  "cloudabi 0.1.0",
  "instant",
  "libc",
- "redox_syscall",
+ "redox_syscall 0.1.56",
  "smallvec",
  "winapi",
 ]
 
 [[package]]
-name = "percent-encoding"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
-
-[[package]]
-name = "pin-project"
-version = "1.0.2"
+name = "parking_lot_core"
+version = "0.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7"
+checksum = "b2f4f894f3865f6c0e02810fc597300f34dc2510f66400da262d8ae10e75767d"
 dependencies = [
- "pin-project-internal",
+ "cfg-if 1.0.0",
+ "libc",
+ "redox_syscall 0.2.8",
+ "smallvec",
+ "windows-sys 0.29.0",
 ]
 
 [[package]]
-name = "pin-project-internal"
-version = "1.0.2"
+name = "percent-encoding"
+version = "2.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.103",
-]
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
 
 [[package]]
 name = "pin-project-lite"
@@ -1371,13 +1258,22 @@ version = "0.1.56"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
 
+[[package]]
+name = "redox_syscall"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
+dependencies = [
+ "bitflags 1.2.1",
+]
+
 [[package]]
 name = "redox_termios"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bc495930de8d330f14856cface52561b7d79a072c76e438cf8f34d7233a35fa7"
 dependencies = [
- "redox_syscall",
+ "redox_syscall 0.1.56",
 ]
 
 [[package]]
@@ -1413,15 +1309,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b"
 dependencies = [
  "base64 0.22.0",
- "bytes 1.0.0",
+ "bytes",
  "encoding_rs",
  "futures-core",
  "futures-util",
- "h2 0.4.0",
- "http 1.0.0",
- "http-body 1.0.1",
+ "h2",
+ "http",
+ "http-body",
  "http-body-util",
- "hyper 1.1.0",
+ "hyper",
  "hyper-rustls",
  "hyper-tls",
  "hyper-util",
@@ -1660,40 +1556,18 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
 
 [[package]]
 name = "smallvec"
-version = "1.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"
-
-[[package]]
-name = "socket2"
-version = "0.3.16"
+version = "1.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
-dependencies = [
- "cfg-if 0.1.10",
- "libc",
- "redox_syscall",
- "winapi",
-]
+checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e"
 
 [[package]]
 name = "socket2"
-version = "0.4.10"
+version = "0.5.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
 dependencies = [
  "libc",
- "winapi",
-]
-
-[[package]]
-name = "socket2"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f86942952dddcbda5e75d086eb38ae9e51d5bc0374299ff4596d836f036dbc36"
-dependencies = [
- "libc",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
 ]
 
 [[package]]
@@ -1787,7 +1661,7 @@ dependencies = [
  "cfg-if 0.1.10",
  "libc",
  "rand",
- "redox_syscall",
+ "redox_syscall 0.1.56",
  "remove_dir_all",
  "winapi",
 ]
@@ -1818,7 +1692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8affd752d0f2c7127d6d5f1b98182a5471606b48b1a955165d39eb5e4887ceba"
 dependencies = [
  "libc",
- "redox_syscall",
+ "redox_syscall 0.1.56",
  "redox_termios",
 ]
 
@@ -1869,33 +1743,31 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
 
 [[package]]
 name = "tokio"
-version = "1.7.0"
+version = "1.43.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c79ba603c337335df6ba6dd6afc38c38a7d5e1b0c871678439ea973cd62a118e"
+checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
 dependencies = [
- "autocfg 1.1.0",
- "bytes 1.0.0",
+ "backtrace",
+ "bytes",
  "libc",
- "memchr",
  "mio",
- "num_cpus",
- "once_cell",
- "parking_lot",
+ "parking_lot 0.12.0",
  "pin-project-lite",
  "signal-hook-registry",
+ "socket2",
  "tokio-macros",
- "winapi",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
 name = "tokio-macros"
-version = "1.1.0"
+version = "2.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 1.0.103",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -1925,7 +1797,7 @@ version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
 dependencies = [
- "bytes 1.0.0",
+ "bytes",
  "futures-core",
  "futures-sink",
  "pin-project-lite",
@@ -1933,27 +1805,6 @@ dependencies = [
  "tracing",
 ]
 
-[[package]]
-name = "tower"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ebe6c299e025c20c08a730be54f816b90089d153a58b8648adea98eee85c82a"
-dependencies = [
- "futures-core",
- "futures-util",
- "pin-project",
- "tokio",
- "tower-layer",
- "tower-service",
- "tracing",
-]
-
-[[package]]
-name = "tower-layer"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62"
-
 [[package]]
 name = "tower-service"
 version = "0.3.0"
@@ -1967,7 +1818,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160"
 dependencies = [
  "cfg-if 1.0.0",
- "log",
  "pin-project-lite",
  "tracing-attributes",
  "tracing-core",
@@ -2161,9 +2011,9 @@ dependencies = [
 
 [[package]]
 name = "winapi"
-version = "0.3.9"
+version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
 dependencies = [
  "winapi-i686-pc-windows-gnu",
  "winapi-x86_64-pc-windows-gnu",
@@ -2220,6 +2070,19 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
+[[package]]
+name = "windows-sys"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ceb069ac8b2117d36924190469735767f0990833935ab430155e71a44bafe148"
+dependencies = [
+ "windows_aarch64_msvc 0.29.0",
+ "windows_i686_gnu 0.29.0",
+ "windows_i686_msvc 0.29.0",
+ "windows_x86_64_gnu 0.29.0",
+ "windows_x86_64_msvc 0.29.0",
+]
+
 [[package]]
 name = "windows-sys"
 version = "0.36.0"
@@ -2266,6 +2129,15 @@ dependencies = [
  "windows-targets 0.48.0",
 ]
 
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
 [[package]]
 name = "windows-targets"
 version = "0.42.1"
@@ -2330,6 +2202,12 @@ version = "0.52.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
 
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d027175d00b01e0cbeb97d6ab6ebe03b12330a35786cbaca5252b1c4bf5d9b"
+
 [[package]]
 name = "windows_aarch64_msvc"
 version = "0.36.0"
@@ -2354,6 +2232,12 @@ version = "0.52.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
 
+[[package]]
+name = "windows_i686_gnu"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8793f59f7b8e8b01eda1a652b2697d87b93097198ae85f823b969ca5b89bba58"
+
 [[package]]
 name = "windows_i686_gnu"
 version = "0.36.0"
@@ -2384,6 +2268,12 @@ version = "0.52.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
 
+[[package]]
+name = "windows_i686_msvc"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8602f6c418b67024be2996c512f5f995de3ba417f4c75af68401ab8756796ae4"
+
 [[package]]
 name = "windows_i686_msvc"
 version = "0.36.0"
@@ -2408,6 +2298,12 @@ version = "0.52.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
 
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3d615f419543e0bd7d2b3323af0d86ff19cbc4f816e6453f36a2c2ce889c354"
+
 [[package]]
 name = "windows_x86_64_gnu"
 version = "0.36.0"
@@ -2450,6 +2346,12 @@ version = "0.52.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
 
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561"
+
 [[package]]
 name = "windows_x86_64_msvc"
 version = "0.36.0"
index 5aa1b129aaf25825beaf48b98203944b59ba6e9d..73e751eb6c90c4307ec918dcfb39693258c39ae3 100644 (file)
@@ -42,7 +42,7 @@ eyre = "0.6"
 fehler = "1"
 futures = "0.3"
 heck = ">=0.4, <0.6"
-hyper = { version = "0.14.7", features = ["full"] }
+hyper = { version = "1", features = ["full"] }
 hyper-util = "0.1.10"
 indenter = "0.3"
 ipnet = "2.3"
@@ -62,7 +62,7 @@ sha2 = "0.10"
 subtle = "2"
 syslog = ">=6, <8"
 thiserror = ">=1.0.2, <3"
-tokio = { version = "1.7", features = ["full"] }
+tokio = { version = "1.43", features = ["full"] }
 void = "1"
 http-body = "1.0.1"
 http-body-util = "0.1.2"
index fb4036e2bd024ab539864dbaa1a12112d59fcacf..2b9d03a7b5112653b418a14e857317f49368f7ad 100644 (file)
@@ -25,7 +25,7 @@ Build-Depends: debhelper (>= 12),
     librust-heck-dev (>= 0.4~) <!upstream-cargo>,
     librust-http-body-dev (>= 1.0.1~) <!upstream-cargo>,
     librust-http-body-util-dev (>= 0.1.2~) <!upstream-cargo>,
-    librust-hyper-dev (>= 0.14.7~) <!upstream-cargo>,
+    librust-hyper-dev (>= 1~) <!upstream-cargo>,
     librust-hyper-util-dev (>= 0.1.10~) <!upstream-cargo>,
     librust-indenter-dev (>= 0.3~) <!upstream-cargo>,
     librust-ipnet-dev (>= 2.3~) <!upstream-cargo>,
@@ -51,7 +51,7 @@ Build-Depends: debhelper (>= 12),
     librust-syn-dev (>= 1~) <!upstream-cargo>,
     librust-syslog-dev (>= 6~) <!upstream-cargo>,
     librust-thiserror-dev (>= 1.0.2~) <!upstream-cargo>,
-    librust-tokio-dev (>= 1.7~) <!upstream-cargo>,
+    librust-tokio-dev (>= 1.43~) <!upstream-cargo>,
     librust-void-dev (>= 1~) <!upstream-cargo>,
 Standards-Version: 4.6.1
 
index 3d0ee8de8ab9a09bf793ede8f05d1e50d9ff71a2..a784636b61d0e3524fdd011951ba5a7716ab37be 100755 (executable)
@@ -11,8 +11,5 @@ cp Cargo.lock.minimal Cargo.lock
 $CARGO +nightly update -Z minimal-versions
 $CARGO +nightly update -p openssl -p openssl-sys
 
-# -Z minimal-versions leaves this at 0.14.28 which is broken
-$CARGO +nightly update -p hyper@0.14.28 --precise=0.14.7
-
 cp Cargo.lock Cargo.lock.minimal
 mv Cargo.lock.normal Cargo.lock
index 1aa6f2664be9447e69168069864f3a0f9064cf02..32d06a7e822cf70960219b1529b6dcc60ee5f96b 100644 (file)
@@ -239,6 +239,15 @@ async fn async_main(opts: Opts, daemon: Option<Daemoniser>) {
       all_clients,
     });
 
+    let max_buffer = chain!(
+      [16384], // hyper demands at least 8192
+      ics.iter().map(|ic| {
+        [ic.max_batch_up,
+         ic.max_batch_down]
+      }).flatten(),
+    ).max().expect("not empty since we have at least one [item]")
+      .try_into().unwrap_or_else(|_: TryFromIntError| usize::MAX);
+
     for (ic, (web_recv, route_recv)) in izip!(
       ics,
       client_handles_recv,
@@ -255,22 +264,29 @@ async fn async_main(opts: Opts, daemon: Option<Daemoniser>) {
       let mut listeners = vec![];
       for saddr in &global.config.addrs {
         let saddr = SocketAddr::new(*saddr, global.config.port);
-        // TODO move bind() here
-        let listener = ();
+        let listener = tokio::net::TcpListener::bind(saddr)
+          .await
+          .with_context(|| format!("bind {}", saddr))?;
         listeners.push((saddr, listener));
       }
       listeners
     };
 
     for (saddr, listener) in listeners {
-      let make_service = hyper::service::make_service_fn({
-        let global = global.clone();
-        move |conn: &hyper::server::conn::AddrStream| {
-          let caddr = conn.remote_addr();
-          let global = global.clone();
-          let caddr = Arc::new(format!("[{}]", caddr));
+      info!("listening on {}", &saddr);
+      let global = global.clone();
+
+      let task = tokio::task::spawn(async move {
+        loop {
+          let (conn, caddr) = match listener.accept().await {
+            Ok(y) => y,
+            Err(e) => { debug!("{saddr}: listen error: {e:#}"); continue; }
+          };
+          let caddr = Arc::new(format!("[{caddr}]"));
 
           let service = hyper::service::service_fn({
+            let global = global.clone();
+            let caddr = caddr.clone();
             move |req| {
               let global = global.clone();
               let caddr = caddr.clone();
@@ -285,20 +301,22 @@ async fn async_main(opts: Opts, daemon: Option<Daemoniser>) {
               }
             }
           });
-          async { Ok::<_, Void>(service) }
-        }
-      });
 
-      let () = listener; // TODO move bind() earlier.
-      let server = hyper::Server::try_bind(&saddr)
-        .context("bind")?
-        .http1_preserve_header_case(true)
-        .serve(make_service);
-      info!("listening on {}", &saddr);
-      let task = tokio::task::spawn(async move {
-        match server.await {
-          Ok(()) => anyhow!("shut down?!"),
-          Err(e) => e.into(),
+          let conn = hyper_util::rt::tokio::TokioIo::new(conn);
+
+          let conn_fut = hyper::server::conn::http1::Builder::new()
+            .half_close(true)
+            .title_case_headers(true)
+            .max_buf_size(max_buffer)
+            .serve_connection(conn, service);
+
+          tokio::task::spawn(async move {
+            match conn_fut.await {
+              Ok(()) => {},
+              Err(e) => trace!("{}: client connection from {} failed: {:#}",
+                               saddr, caddr, e),
+            };
+          });
         }
       });
       tasks.push((task, format!("http server {}", saddr)));
index 4515ec6f48843e8526f47a03829dea31ad562789..d3cf99388bd6d378a99b448454adff697d1c4e4b 100644 (file)
@@ -13,7 +13,7 @@ pub struct WebRequest {
   pub initial: Box<[u8]>,
   pub initial_remaining: usize,
   pub length_hint: usize,
-  pub body: hyper::body::Body,
+  pub body: http_body_util::BodyDataStream<hyper::body::Incoming>,
   pub boundary_finder: multipart::BoundaryFinder,
   pub reply_to: oneshot::Sender<WebResponse>,
   pub warnings: Warnings,
@@ -34,7 +34,7 @@ pub type WebResponseBody = BufBody<FrameQueueBuf>;
 pub async fn handle(
   conn: Arc<String>,
   global: Arc<Global>,
-  req: hyper::Request<hyper::Body>
+  req: hyper::Request<hyper::body::Incoming>
 ) -> Result<hyper::Response<WebResponseBody>, hyper::http::Error> {
   if req.method() == Method::GET {
     let mut resp = hyper::Response::new(BufBody::display("hippotat\r\n"));
@@ -85,7 +85,9 @@ pub async fn handle(
       |e| { let _ = warnings.add(&e.wrap_err("parsing Content-Length")); 0 }
     );
 
-    let mut body = req.into_body();
+    let body = req.into_body();
+    let mut body = http_body_util::BodyDataStream::new(body);
+
     let initial = match read_limited_bytes(
       METADATA_MAX_LEN, default(), length_hint, Pin::new(&mut body),
     ).await {
index d1574eec4d7683a48dc622c3cefa9fc2bdbd3b2b..c2adfbb481c637b75beb7a17eaefe3668332fd87 100644 (file)
@@ -16,6 +16,7 @@ pub use std::io::{self, Cursor, ErrorKind, IoSlice, Read as _, Write as _};
 pub use std::iter;
 pub use std::mem;
 pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
+pub use std::num::TryFromIntError;
 pub use std::os::fd::{BorrowedFd, OwnedFd};
 pub use std::os::raw::c_int;
 pub use std::path::{Path, PathBuf};
@@ -32,10 +33,10 @@ pub use either::Either;
 pub use easy_ext::ext;
 pub use fehler::{throw, throws};
 pub use futures::{poll, future, FutureExt, StreamExt, TryStreamExt};
-pub use hyper::body::{Bytes, Buf, HttpBody};
+pub use hyper::body::{Bytes, Buf};
 pub use hyper::{Method};
 pub use ipnet::IpNet;
-pub use itertools::{iproduct, izip, Itertools};
+pub use itertools::{chain, iproduct, izip, Itertools};
 pub use lazy_regex::{regex_captures, regex_is_match, regex_replace_all};
 pub use lazy_static::lazy_static;
 pub use log::{trace, debug, info, warn, error};
index 34dd2a515ec87af931e89b4844120a91b5c243e3..1e393c1435fbc844935050607e174bbd3abbc6bb 100644 (file)
@@ -133,15 +133,13 @@ impl BufBody<FrameQueueBuf> {
   }
 }
 
-impl<B:Buf> HttpBody for BufBody<B> {
+impl<B:Buf> hyper::body::Body for BufBody<B> {
   type Error = Void;
   type Data = B;
-  fn poll_data(self: Pin<&mut Self>, _: &mut std::task::Context<'_>)
-               -> Poll<Option<Result<B, Void>>> {
-    Poll::Ready(Ok(self.project().body.take()).transpose())
-  }
-  fn poll_trailers(self: Pin<&mut Self>, _: &mut std::task::Context<'_>)
- -> Poll<Result<Option<hyper::HeaderMap<hyper::header::HeaderValue>>, Void>> {
-    Poll::Ready(Ok(None))
+  fn poll_frame(self: Pin<&mut Self>, _: &mut std::task::Context<'_>)
+                -> Poll<Option<Result<hyper::body::Frame<B>, Void>>> {
+    Poll::Ready(Ok(self.project().body.take()
+                   .map(hyper::body::Frame::data)
+    ).transpose())
   }
 }