Merge pull request #1120 from dylanplecki/issue-1119-mruby-header-overwrite

Fix #1119: Overwrite of first header on mruby call to env.req.set_header(..)
This commit is contained in:
Tatsuhiro Tsujikawa 2018-01-28 19:35:20 +09:00 committed by GitHub
commit 0ba4bf51e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}