nghttpx: Fix possible data loss on backend connection upgrade
This commit is contained in:
parent
1739b5a0e6
commit
ad93cea544
|
@ -760,11 +760,6 @@ int HttpDownstreamConnection::on_read() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (downstream_->response_buf_full()) {
|
||||
downstream_->pause_read(SHRPX_NO_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (downstream_->get_upgraded()) {
|
||||
if (nproc < static_cast<size_t>(nread)) {
|
||||
// Data from buf.data() + nproc are for upgraded protocol.
|
||||
|
@ -783,6 +778,11 @@ int HttpDownstreamConnection::on_read() {
|
|||
// upgrade.
|
||||
return on_read();
|
||||
}
|
||||
|
||||
if (downstream_->response_buf_full()) {
|
||||
downstream_->pause_read(SHRPX_NO_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue