nghttpx: Fix bug that END_STREAM is not set in backend for POST with Upgrade
This commit is contained in:
parent
7e51a87111
commit
326b4c467b
|
@ -928,13 +928,13 @@ void Downstream::inspect_http1_request() {
|
||||||
if (!upgrade_request_) {
|
if (!upgrade_request_) {
|
||||||
auto idx = request_hdidx_[http2::HD_UPGRADE];
|
auto idx = request_hdidx_[http2::HD_UPGRADE];
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
upgrade_request_ = true;
|
|
||||||
|
|
||||||
auto &val = request_headers_[idx].value;
|
auto &val = request_headers_[idx].value;
|
||||||
// TODO Perform more strict checking for upgrade headers
|
// TODO Perform more strict checking for upgrade headers
|
||||||
if (util::streq_l(NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, val.c_str(),
|
if (util::streq_l(NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, val.c_str(),
|
||||||
val.size())) {
|
val.size())) {
|
||||||
http2_upgrade_seen_ = true;
|
http2_upgrade_seen_ = true;
|
||||||
|
} else {
|
||||||
|
upgrade_request_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,10 +80,11 @@ public:
|
||||||
bool request_buf_full();
|
bool request_buf_full();
|
||||||
// Returns true if upgrade (HTTP Upgrade or CONNECT) is succeeded.
|
// Returns true if upgrade (HTTP Upgrade or CONNECT) is succeeded.
|
||||||
void check_upgrade_fulfilled();
|
void check_upgrade_fulfilled();
|
||||||
// Returns true if the request is upgrade.
|
// Returns true if the request is upgrade. Upgrade to HTTP/2 is
|
||||||
|
// excluded. For HTTP/2 Upgrade, check get_http2_upgrade_request().
|
||||||
bool get_upgrade_request() const;
|
bool get_upgrade_request() const;
|
||||||
// Returns true if the upgrade is succeded as a result of the call
|
// Returns true if the upgrade is succeded as a result of the call
|
||||||
// check_upgrade_fulfilled().
|
// check_upgrade_fulfilled(). HTTP/2 Upgrade is excluded.
|
||||||
bool get_upgraded() const;
|
bool get_upgraded() const;
|
||||||
// Inspects HTTP/2 request.
|
// Inspects HTTP/2 request.
|
||||||
void inspect_http2_request();
|
void inspect_http2_request();
|
||||||
|
|
Loading…
Reference in New Issue