Fix #1119: Stop overwrite of first header on mruby call to env.req.set_header(..)

This commit is contained in:
Dylan Plecki 2018-01-26 18:49:08 -08:00
parent 6761a933fe
commit 6deee2037d
1 changed files with 2 additions and 1 deletions

View File

@ -246,8 +246,9 @@ mrb_value request_mod_header(mrb_state *mrb, mrb_value self, bool repl) {
continue;
}
if (i != p) {
headers[p++] = std::move(kv);
headers[p] = std::move(kv);
}
++p;
}
headers.resize(p);
}