aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 3d3afaf2d..615f933cf 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -1148,10 +1148,18 @@ ngx_http_v2_state_read_data(ngx_http_v2_connection_t *h2c, u_char *pos,
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) {
@@ -4459,10 +4467,18 @@ ngx_http_v2_read_client_request_body_handler(ngx_http_request_t *r)
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) {