Skip to content

Commit a6eb123

Browse files
authored
Merge pull request #100 from JackMyers001/fix/curl-dont-die-on-header-too-big
fix(test): ignore `curl` exit code when sending a large header
2 parents a0b145d + 48e1cdb commit a6eb123

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fi
225225
message " Make request with a header exceeding limit."
226226
LARGE_HEADER_VALUE=$(head -c 5000 </dev/urandom | base64 | tr -d '\n')
227227
# Do with curl -v and look for "HTTP/1.1 431 Request Header Fields Too Large" output
228-
REQUEST=$(curl -v -k -H "Large-Header: $LARGE_HEADER_VALUE" https://localhost:8443/ 2>&1)
228+
REQUEST=$(curl -v -k -H "Large-Header: $LARGE_HEADER_VALUE" https://localhost:8443/ 2>&1 || true)
229229
if echo "$REQUEST" | grep -q "HTTP/1.1 431 Request Header Fields Too Large"; then
230230
passed "Large header test resulted in HTTP 431."
231231
else

0 commit comments

Comments
 (0)