ngx_http_finalize_request(r, rc);
}
- if (rc == NGX_AGAIN && !stream->no_flow_control) {
+ if (rc == NGX_AGAIN
+ && !stream->no_flow_control
+ && !r->request_body_no_buffering)
+ {
buf = r->request_body->buf;
- window = buf->end - buf->last;
+ if (r->request_body->busy == NULL) {
+ buf->pos = buf->start;
+ buf->last = buf->start;
+ }
+
+ window = buf->end - buf->last;
window -= h2c->state.length - size;
if (window < stream->recv_window) {
return;
}
+ if (r->request_body->busy != NULL) {
+ return;
+ }
+
stream = r->stream;
h2c = stream->connection;
buf = r->request_body->buf;
+
+ buf->pos = buf->start;
+ buf->last = buf->start;
+
window = buf->end - buf->start;
if (h2c->state.stream == stream) {