shrpx: Fix not send RST_STREAM when downstream gets valid EOF

This commit is contained in:
Tatsuhiro Tsujikawa 2013-03-01 00:05:57 +09:00
parent da36fc3953
commit cf1cfca51f
1 changed files with 4 additions and 2 deletions

View File

@ -564,8 +564,10 @@ void spdy_downstream_eventcb(bufferevent *bev, short events, void *ptr)
// RST_STREAM is sent after all pending data are sent. // RST_STREAM is sent after all pending data are sent.
upstream->on_downstream_body_complete(downstream); upstream->on_downstream_body_complete(downstream);
} else if(downstream->get_response_state() == Downstream::MSG_COMPLETE) { } else if(downstream->get_response_state() == Downstream::MSG_COMPLETE) {
// For SSL tunneling? if(downstream->tunnel_established()) {
// For SSL tunneling
upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR); upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
}
} else { } else {
// If stream was not closed, then we set MSG_COMPLETE and let // If stream was not closed, then we set MSG_COMPLETE and let
// on_stream_close_callback delete downstream. // on_stream_close_callback delete downstream.