From 3ad9f9e730ddef21c3ec66f1b76bef164dde5d25 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 19 Jan 2016 19:07:13 +0900 Subject: [PATCH] nghttpx: Fix compiler warning without --with-mruby --- src/shrpx_https_upstream.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shrpx_https_upstream.cc b/src/shrpx_https_upstream.cc index cb8918ad..c822d1ab 100644 --- a/src/shrpx_https_upstream.cc +++ b/src/shrpx_https_upstream.cc @@ -246,7 +246,6 @@ int htp_hdrs_completecb(http_parser *htp) { } auto downstream = upstream->get_downstream(); auto &req = downstream->request(); - auto &resp = downstream->response(); req.http_major = htp->http_major; req.http_minor = htp->http_minor; @@ -338,6 +337,8 @@ int htp_hdrs_completecb(http_parser *htp) { auto worker = handler->get_worker(); auto mruby_ctx = worker->get_mruby_context(); + auto &resp = downstream->response(); + if (mruby_ctx->run_on_request_proc(downstream) != 0) { resp.http_status = 500; return -1;