nghttpx: Fix compiler warning without --with-mruby

This commit is contained in:
Tatsuhiro Tsujikawa 2016-01-19 19:07:13 +09:00
parent a390bd4ce0
commit 3ad9f9e730
1 changed files with 2 additions and 1 deletions

View File

@ -246,7 +246,6 @@ int htp_hdrs_completecb(http_parser *htp) {
} }
auto downstream = upstream->get_downstream(); auto downstream = upstream->get_downstream();
auto &req = downstream->request(); auto &req = downstream->request();
auto &resp = downstream->response();
req.http_major = htp->http_major; req.http_major = htp->http_major;
req.http_minor = htp->http_minor; req.http_minor = htp->http_minor;
@ -338,6 +337,8 @@ int htp_hdrs_completecb(http_parser *htp) {
auto worker = handler->get_worker(); auto worker = handler->get_worker();
auto mruby_ctx = worker->get_mruby_context(); auto mruby_ctx = worker->get_mruby_context();
auto &resp = downstream->response();
if (mruby_ctx->run_on_request_proc(downstream) != 0) { if (mruby_ctx->run_on_request_proc(downstream) != 0) {
resp.http_status = 500; resp.http_status = 500;
return -1; return -1;