Merge branch 'nghttpx-fix-chunked-request-stall'
This commit is contained in:
commit
5a30fafdda
|
@ -696,8 +696,9 @@ int HttpDownstreamConnection::process_blocked_request_buf() {
|
|||
}
|
||||
}
|
||||
|
||||
if (downstream_->get_blocked_request_data_eof()) {
|
||||
return end_upload_data();
|
||||
if (downstream_->get_blocked_request_data_eof() &&
|
||||
downstream_->get_chunked_request()) {
|
||||
end_upload_data_chunk();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -751,6 +752,12 @@ int HttpDownstreamConnection::end_upload_data() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
end_upload_data_chunk();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HttpDownstreamConnection::end_upload_data_chunk() {
|
||||
const auto &req = downstream_->request();
|
||||
|
||||
auto output = downstream_->get_request_buf();
|
||||
|
@ -763,8 +770,6 @@ int HttpDownstreamConnection::end_upload_data() {
|
|||
http2::HDOP_STRIP_ALL);
|
||||
output->append("\r\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
virtual int push_request_headers();
|
||||
virtual int push_upload_data_chunk(const uint8_t *data, size_t datalen);
|
||||
virtual int end_upload_data();
|
||||
void end_upload_data_chunk();
|
||||
|
||||
virtual void pause_read(IOCtrlReason reason);
|
||||
virtual int resume_read(IOCtrlReason reason, size_t consumed);
|
||||
|
|
Loading…
Reference in New Issue