nghttpx: Allow HTTP Upgrade from POST request if response header was not sent

This commit is contained in:
Tatsuhiro Tsujikawa 2015-05-22 01:59:40 +09:00
parent d983dd81ec
commit b20abfc11a
1 changed files with 3 additions and 2 deletions

View File

@ -972,8 +972,9 @@ bool Downstream::get_upgraded() const { return upgraded_; }
bool Downstream::get_upgrade_request() const { return upgrade_request_; } bool Downstream::get_upgrade_request() const { return upgrade_request_; }
bool Downstream::get_http2_upgrade_request() const { bool Downstream::get_http2_upgrade_request() const {
return request_bodylen_ == 0 && http2_upgrade_seen_ && return http2_upgrade_seen_ &&
request_hdidx_[http2::HD_HTTP2_SETTINGS] != -1; request_hdidx_[http2::HD_HTTP2_SETTINGS] != -1 &&
response_state_ == INITIAL;
} }
namespace { namespace {