Skip to content

Commit

Permalink
proxy_request_buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Dec 29, 2021
1 parent 53a8770 commit 64eb49b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nginx/src/http/modules/ngx_http_proxy_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions nginx/src/http/ngx_http_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ struct ngx_http_request_s {

// 0-缓存请求体数据
// 1-不缓存请求体数据
// 与proxy模块的proxy_request_buffering相关
unsigned request_body_no_buffering:1;

// 要求子请求的数据都在内存里,方便处理
Expand Down

0 comments on commit 64eb49b

Please sign in to comment.