diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..eb6c5c6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "hyper/hyper"] + path = hyper/hyper + url = git@github.com:hyperium/hyper.git diff --git a/hyper/hyper b/hyper/hyper new file mode 160000 index 0000000..75aac9f --- /dev/null +++ b/hyper/hyper @@ -0,0 +1 @@ +Subproject commit 75aac9f47fe0246016e6133cd3cfa35b63c8904e diff --git a/hyper/patches/min_local.patch b/hyper/patches/min_local.patch new file mode 100644 index 0000000..ce99e2f --- /dev/null +++ b/hyper/patches/min_local.patch @@ -0,0 +1,14 @@ +diff --git a/src/headers.rs b/src/headers.rs +index 8407be18..ad29ad28 100644 +--- a/src/headers.rs ++++ b/src/headers.rs +@@ -53,7 +53,7 @@ pub(super) fn content_length_parse_all_values(values: ValueIter<'_, HeaderValue> + return None; + } + } else { +- return None ++ return Some(0_0); + } + } + } else { + \ No newline at end of file diff --git a/test_crate.sh b/test_crate.sh index 8a1cbed..a7f8edd 100755 --- a/test_crate.sh +++ b/test_crate.sh @@ -1,6 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail + CRATE="${1:-hyper}" TOOLCHAIN="${TOOLCHAIN:-dev}" echo "Testing $CRATE +$TOOLCHAIN" -cd "$CRATE" && cargo "+$TOOLCHAIN" build --features=full \ No newline at end of file +cd $CRATE + +function build() { + (cd "$CRATE" && RUSTFLAGS='-Zincremental-verify-ich' cargo "+$TOOLCHAIN" build --features=full) +} + +build + +for patch in ./patches/* ; do + echo "Applying $patch..." + + (cd "$CRATE" && git apply "../$patch") + + build + + (cd "$CRATE" && git checkout HEAD .) + + build +done \ No newline at end of file