nghttpx: Handle nil given to request.set_header as value

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-02 22:41:48 +09:00
parent 068529586d
commit f0d41a5ac2
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ mrb_value request_set_header(mrb_state *mrb, mrb_value self) {
std::string(RSTRING_PTR(key), RSTRING_LEN(key)), std::string(RSTRING_PTR(key), RSTRING_LEN(key)),
std::string(RSTRING_PTR(value), RSTRING_LEN(value))); std::string(RSTRING_PTR(value), RSTRING_LEN(value)));
} }
} else { } else if (!mrb_nil_p(values)) {
downstream->add_request_header( downstream->add_request_header(
std::string(RSTRING_PTR(key), RSTRING_LEN(key)), std::string(RSTRING_PTR(key), RSTRING_LEN(key)),
std::string(RSTRING_PTR(values), RSTRING_LEN(values))); std::string(RSTRING_PTR(values), RSTRING_LEN(values)));