1
0
mirror of https://github.com/moparisthebest/spdylay synced 2024-08-13 17:03:54 -04:00

shrpx: Check get_request_state() == MSG_COMPLETE when body is empty

This commit is contained in:
Tatsuhiro Tsujikawa 2013-03-08 01:50:46 +09:00
parent 4461cb24ed
commit 7264966bb5

View File

@ -196,6 +196,11 @@ ssize_t spdy_data_read_callback(spdylay_session *session,
return SPDYLAY_ERR_DEFERRED; return SPDYLAY_ERR_DEFERRED;
} }
if(evbuffer_get_length(body) == 0) { 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; return SPDYLAY_ERR_DEFERRED;
} }
} }