nghttpx: Handle nil given to request.set_header as value
This commit is contained in:
parent
068529586d
commit
f0d41a5ac2
|
@ -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)));
|
||||||
|
|
Loading…
Reference in New Issue