Issue RST_STREAM if the remote end of tunnel is closed.

This commit is contained in:
Tatsuhiro Tsujikawa 2012-07-11 19:48:07 +09:00
parent a143133d43
commit e5de9c9708
1 changed files with 5 additions and 1 deletions

View File

@ -436,7 +436,11 @@ void spdy_downstream_eventcb(bufferevent *bev, short events, void *ptr)
LOG(INFO) << "Downstream body was ended by EOF"; LOG(INFO) << "Downstream body was ended by EOF";
} }
downstream->set_response_state(Downstream::MSG_COMPLETE); downstream->set_response_state(Downstream::MSG_COMPLETE);
if(downstream->tunnel_established()) {
upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
} else {
upstream->on_downstream_body_complete(downstream); upstream->on_downstream_body_complete(downstream);
}
upstream->send(); upstream->send();
} else if(downstream->get_response_state() == Downstream::MSG_COMPLETE) { } else if(downstream->get_response_state() == Downstream::MSG_COMPLETE) {
// For SSL tunneling? // For SSL tunneling?