Skip to content

Commit

Permalink
varnishtest: set -nolen on tx[req|resp] C-L or T-E
Browse files Browse the repository at this point in the history
  • Loading branch information
AlveElde authored and dridi committed Nov 28, 2022
1 parent 6840fbd commit 4c8e095
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/varnishtest/tests/b00037.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ varnish v1 -vsl_catchup
varnish v1 -expect client_req_400 == 1

client c1 {
txreq -method POST -hdr "Content-Length: 12" -bodylen 12
txreq -method POST -hdr "Content-Length: 12" -hdr "Content-Length: 12" -bodylen 12
rxresp
expect resp.status == 400
} -run
Expand Down
3 changes: 3 additions & 0 deletions bin/varnishtest/vtc_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ http_tx_parse_args(char * const *av, struct vtclog *vl, struct http *hp,
} else if (!strcmp(*av, "-nohost")) {
nohost = 1;
} else if (!strcmp(*av, "-hdr")) {
if (!strncasecmp(av[1], "Content-Length:", 15) ||
!strncasecmp(av[1], "Transfer-Encoding:", 18))
nolen = 1;
if (!strncasecmp(av[1], "Host:", 5))
nohost = 1;
VSB_printf(hp->vsb, "%s%s", av[1], nl);
Expand Down

0 comments on commit 4c8e095

Please sign in to comment.