From 7264966bb5843c11599e5c362ecfe019788db74f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 8 Mar 2013 01:50:46 +0900 Subject: [PATCH] shrpx: Check get_request_state() == MSG_COMPLETE when body is empty --- src/shrpx_spdy_downstream_connection.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shrpx_spdy_downstream_connection.cc b/src/shrpx_spdy_downstream_connection.cc index 0c6c611..674d78e 100644 --- a/src/shrpx_spdy_downstream_connection.cc +++ b/src/shrpx_spdy_downstream_connection.cc @@ -196,6 +196,11 @@ ssize_t spdy_data_read_callback(spdylay_session *session, return SPDYLAY_ERR_DEFERRED; } if(evbuffer_get_length(body) == 0) { + // Check get_request_state() == MSG_COMPLETE just in case + if(downstream->get_request_state() == Downstream::MSG_COMPLETE) { + *eof = 1; + break; + } return SPDYLAY_ERR_DEFERRED; } }