nghttpx: Fix assertion failure on mruby send_info with HTTP/1 frontend

This commit is contained in:
Tatsuhiro Tsujikawa 2018-11-15 10:14:40 +09:00
parent f6644a92af
commit 3c393dca58
1 changed files with 2 additions and 1 deletions

View File

@ -1049,7 +1049,7 @@ int HttpsUpstream::on_downstream_header_complete(Downstream *downstream) {
auto &resp = downstream->response();
auto &balloc = downstream->get_block_allocator();
auto dconn = downstream->get_downstream_connection();
assert(dconn);
// dconn might be nullptr if this is non-final response from mruby.
if (downstream->get_non_final_response() &&
!downstream->supports_non_final_response()) {
@ -1059,6 +1059,7 @@ int HttpsUpstream::on_downstream_header_complete(Downstream *downstream) {
#ifdef HAVE_MRUBY
if (!downstream->get_non_final_response()) {
assert(dconn);
const auto &group = dconn->get_downstream_addr_group();
if (group) {
const auto &dmruby_ctx = group->mruby_ctx;