From 66579663342de843cd2261ff0831bafa6f7986c5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 20 Feb 2015 01:24:42 +0900 Subject: [PATCH] nghttpx: HttpsUpdatem: Don't send error_page if response state is MSG_COMPLETE --- src/shrpx_https_upstream.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shrpx_https_upstream.cc b/src/shrpx_https_upstream.cc index 4406f437..15e418ce 100644 --- a/src/shrpx_https_upstream.cc +++ b/src/shrpx_https_upstream.cc @@ -296,6 +296,7 @@ int HttpsUpstream::on_read() { } } + // http_parser_execute() does nothing once it entered error state. auto nread = http_parser_execute( &htp_, &htp_hooks, reinterpret_cast(rb->pos), rb->rleft()); @@ -349,6 +350,10 @@ int HttpsUpstream::on_read() { } if (htperr != HPE_OK) { + if (downstream->get_response_state() == Downstream::MSG_COMPLETE) { + return 0; + } + if (LOG_ENABLED(INFO)) { ULOG(INFO, this) << "HTTP parse failure: " << "(" << http_errno_name(htperr) << ") "