rb->rest = 0;
}
- if (r->request_body_no_buffering) {
+ if (r->request_body_no_buffering && !flush) {
break;
}
ngx_add_timer(fc->read, clcf->client_body_timeout);
if (r->request_body_no_buffering) {
- ngx_post_event(fc->read, &ngx_posted_events);
+ if (!flush) {
+ ngx_post_event(fc->read, &ngx_posted_events);
+ }
+
return NGX_AGAIN;
}
}
if (r->request_body_no_buffering) {
- ngx_post_event(fc->read, &ngx_posted_events);
+ if (!flush) {
+ ngx_post_event(fc->read, &ngx_posted_events);
+ }
+
return NGX_OK;
}
ngx_connection_t *fc;
ngx_http_v2_stream_t *stream;
ngx_http_v2_connection_t *h2c;
- ngx_http_core_loc_conf_t *clcf;
stream = r->stream;
fc = r->connection;
return NGX_HTTP_BAD_REQUEST;
}
- rc = ngx_http_v2_filter_request_body(r);
+ rc = ngx_http_v2_process_request_body(r, NULL, 0, r->stream->in_closed, 1);
- if (rc != NGX_OK) {
+ if (rc != NGX_OK && rc != NGX_AGAIN) {
stream->skip_data = 1;
return rc;
}
- if (r->request_body->rest == 0 && r->request_body->last_saved) {
+ if (rc == NGX_OK) {
return NGX_OK;
}
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- if (stream->recv_window == 0) {
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
- ngx_add_timer(fc->read, clcf->client_body_timeout);
- }
-
stream->recv_window = window;
return NGX_AGAIN;