mruby: Fix bug that response header is unexpectedly overwritten

The bug is the same bug fixed by
6deee2037d, but in response handler.
This commit is contained in:
Tatsuhiro Tsujikawa 2018-01-28 19:41:45 +09:00
parent 0ba4bf51e4
commit e098a21132
1 changed files with 2 additions and 1 deletions

View File

@ -138,8 +138,9 @@ mrb_value response_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);
}