From 64eb49bd8859227c85d558c9f1bf7381cb428a94 Mon Sep 17 00:00:00 2001 From: Chrono Date: Wed, 29 Dec 2021 17:05:44 +0800 Subject: [PATCH] proxy_request_buffering --- nginx/src/http/modules/ngx_http_proxy_module.c | 1 + nginx/src/http/ngx_http_request.h | 1 + 2 files changed, 2 insertions(+) diff --git a/nginx/src/http/modules/ngx_http_proxy_module.c b/nginx/src/http/modules/ngx_http_proxy_module.c index e7bdf8bb..144832f3 100644 --- a/nginx/src/http/modules/ngx_http_proxy_module.c +++ b/nginx/src/http/modules/ngx_http_proxy_module.c @@ -1068,6 +1068,7 @@ ngx_http_proxy_handler(ngx_http_request_t *r) u->accel = 1; + // 配置指令,禁止缓存客户端的请求,即收到数据就立即转发 if (!plcf->upstream.request_buffering && plcf->body_values == NULL && plcf->upstream.pass_request_body && (!r->headers_in.chunked diff --git a/nginx/src/http/ngx_http_request.h b/nginx/src/http/ngx_http_request.h index 1b91e9e2..7e8c6ca1 100644 --- a/nginx/src/http/ngx_http_request.h +++ b/nginx/src/http/ngx_http_request.h @@ -730,6 +730,7 @@ struct ngx_http_request_s { // 0-缓存请求体数据 // 1-不缓存请求体数据 + // 与proxy模块的proxy_request_buffering相关 unsigned request_body_no_buffering:1; // 要求子请求的数据都在内存里,方便处理