vere: filter out content-length header from eyre

This commit is contained in:
Pyry Kovanen 2019-12-04 17:34:02 +02:00 committed by pkova
parent cfc94fb606
commit 864fa7ef47

View File

@ -518,14 +518,16 @@ _http_start_respond(u3_hreq* req_u,
c3_i has_len_i = 0;
while ( 0 != hed_u ) {
h2o_add_header_by_str(&rec_u->pool, &rec_u->res.headers,
hed_u->nam_c, hed_u->nam_w, 0, 0,
hed_u->val_c, hed_u->val_w);
if ( 0 == strncmp(hed_u->nam_c, "content-length", 14) ) {
has_len_i = 1;
}
else {
h2o_add_header_by_str(&rec_u->pool, &rec_u->res.headers,
hed_u->nam_c, hed_u->nam_w, 0, 0,
hed_u->val_c, hed_u->val_w);
}
hed_u = hed_u->nex_u;
}