Commit 9bfdda5e authored by Nils Goroll's avatar Nils Goroll Committed by Dridi Boukelmoune

Fix assertion in HTTP_create()

For the case that http_max_hdr is not a multiple of the pointer
size.

Ref #2690
parent 56c70c2a
......@@ -155,7 +155,7 @@ HTTP_create(void *p, uint16_t nhttp, unsigned len)
hp->hd = (void*)(hp + 1);
hp->shd = nhttp;
hp->hdf = (void*)(hp->hd + nhttp);
assert((unsigned char*)p + len == hp->hdf + nhttp);
assert((unsigned char*)p + len == hp->hdf + PRNDUP(nhttp));
return (hp);
}
......
varnishtest "Check http_max_hdr values"
server s1 -repeat 17 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
return(pass);
}
} -start
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 33}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 34}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 35}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 36}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 37}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 38}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 39}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 40}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 41}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 42}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 43}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 44}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 45}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 46}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 47}
client c1 {
txreq
rxresp
} -run
varnish v1 -cliok {param.set http_max_hdr 48}
client c1 {
txreq
rxresp
} -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment