1 Star 0 Fork 0

kuoyihp/nginx-lua-module-zh-wiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
doc
access_by_lua.md
access_by_lua_file.md
body_filter_by_lua.md
body_filter_by_lua_file.md
bugs-and-patches.md
c-macro-configurations.md
changes.md
code-repository.md
content_by_lua.md
content_by_lua_file.md
copyright-and-license.md
core-constants.md
coroutinecreate.md
coroutineresume.md
coroutinerunning.md
coroutinestatus.md
coroutinewrap.md
coroutineyield.md
cosockets-not-available-everywhere.md
data-sharing-within-an-nginx-worker.md
description.md
directives.md
header_filter_by_lua.md
header_filter_by_lua_file.md
http-10-support.md
http-method-constants.md
http-status-constants.md
init_by_lua.md
init_by_lua_file.md
init_worker_by_lua.md
init_worker_by_lua_file.md
installation-on-ubuntu-1110.md
installation.md
introduction.md
locations-configured-by-subrequest-directives-of-other-modules.md
log_by_lua.md
log_by_lua_file.md
lua-code-cache.md
lua-coroutine-yieldingresuming.md
lua-use-default-type.md
lua-variable-scope.md
lua_check_client_abort.md
lua_http10_buffering.md
lua_max_pending_timers.md
lua_max_running_timers.md
lua_need_request_body.md
lua_package_cpath.md
lua_package_path.md
lua_regex_cache_max_entries.md
lua_regex_match_limit.md
lua_shared_dict.md
lua_socket_buffer_size.md
lua_socket_connect_timeout.md
lua_socket_keepalive_timeout.md
lua_socket_log_errors.md
lua_socket_pool_size.md
lua_socket_read_timeout.md
lua_socket_send_lowat.md
lua_socket_send_timeout.md
lua_ssl_ciphers.md
lua_ssl_crl.md
lua_ssl_protocols.md
lua_ssl_trusted_certificate.md
lua_ssl_verify_depth.md
lua_transform_underscores_in_response_headers.md
lualuajit-bytecode-support.md
missing-data-on-short-circuited-requests.md
mixing-with-ssi-not-supported.md
name.md
ndkset_vardirective.md
nginx-api-for-lua.md
nginx-compatibility.md
nginx-log-level-constants.md
ngxarg.md
ngxconfigdebug.md
ngxconfignginx_configure.md
ngxconfignginx_version.md
ngxconfigngx_lua_version.md
ngxconfigprefix.md
ngxcookie_time.md
ngxcrc32_long.md
ngxcrc32_short.md
ngxctx.md
ngxdecode_args.md
ngxdecode_base64.md
ngxencode_args.md
ngxencode_base64.md
ngxeof.md
ngxescape_uri.md
ngxexec.md
ngxexit.md
ngxflush.md
ngxget_phase.md
ngxheaderheader.md
ngxheaders_sent.md
ngxhmac_sha1.md
ngxhttp_time.md
ngxis_subrequest.md
ngxlocaltime.md
ngxlocationcapture.md
ngxlocationcapture_multi.md
ngxlog.md
ngxmd5.md
ngxmd5_bin.md
ngxnow.md
ngxon_abort.md
ngxparse_http_time.md
ngxprint.md
ngxquote_sql_str.md
ngxredirect.md
ngxrefind.md
ngxregmatch.md
ngxregsub.md
ngxrematch.md
ngxreqappend_body.md
ngxreqclear_header.md
ngxreqdiscard_body.md
ngxreqfinish_body.md
ngxreqget_body_data.md
ngxreqget_body_file.md
ngxreqget_headers.md
ngxreqget_method.md
ngxreqget_post_args.md
ngxreqget_uri_args.md
ngxreqhttp_version.md
ngxreqinit_body.md
ngxreqraw_header.md
ngxreqread_body.md
ngxreqset_body_data.md
ngxreqset_body_file.md
ngxreqset_header.md
ngxreqset_method.md
ngxreqset_uri.md
ngxreqset_uri_args.md
ngxreqsocket.md
ngxreqstart_time.md
ngxrespget_headers.md
ngxresub.md
ngxsay.md
ngxsend_headers.md
ngxsha1_bin.md
ngxshareddict.md
ngxshareddictadd.md
ngxshareddictdelete.md
ngxshareddictflush_all.md
ngxshareddictflush_expired.md
ngxshareddictget.md
ngxshareddictget_keys.md
ngxshareddictget_stale.md
ngxshareddictincr.md
ngxshareddictreplace.md
ngxshareddictsafe_add.md
ngxshareddictsafe_set.md
ngxshareddictset.md
ngxsleep.md
ngxsocketconnect.md
ngxsockettcp.md
ngxsocketudp.md
ngxstatus.md
ngxthreadkill.md
ngxthreadspawn.md
ngxthreadwait.md
ngxtime.md
ngxtimerat.md
ngxtoday.md
ngxunescape_uri.md
ngxupdate_time.md
ngxutctime.md
ngxvarvariable.md
ngxworkerexiting.md
ngxworkerpid.md
obsolete-sections.md
print.md
rewrite_by_lua.md
rewrite_by_lua_file.md
rewrite_by_lua_no_postpone.md
see-also.md
set_by_lua.md
set_by_lua_file.md
spdy-mode-not-fully-supported.md
special-escaping-sequences.md
special-pcre-sequences.md
statically-linking-pure-lua-modules.md
status.md
synopsis.md
system-environment-variable-support.md
tcp-socket-connect-operation-issues.md
tcpsockclose.md
tcpsockconnect.md
tcpsockgetreusedtimes.md
tcpsockreceive.md
tcpsockreceiveuntil.md
tcpsocksend.md
tcpsocksetkeepalive.md
tcpsocksetoption.md
tcpsocksettimeout.md
tcpsocksslhandshake.md
test-suite.md
todo.md
typical-uses.md
udpsockclose.md
udpsockreceive.md
udpsocksend.md
udpsocksetpeername.md
udpsocksettimeout.md
README.md
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lua_http10_buffering.md 1.90 KB
一键复制 编辑 原始数据 按行查看 历史

lua_http10_buffering

语法: lua_http10_buffering on|off

默认: lua_http10_buffering on

环境: http, server, location, location-if

对 HTTP 1.0(或更老)请求,启用或禁用自动应答缓冲区。这个缓冲机制主要用于应答头包含合适Content-Length长度的 HTTP 1.0 长连接。

如果 Lua 代码在发送应答头之前明确设置了应答头的Content-Length(调用 ngx.send_headers 或 隐式首次调用 ngx.sayngx.print 其中任何一个),HTTP 1.0应答缓冲区都将被禁用,即使这个指令是打开的。

流式输出(例如,调用 ngx.flush)非常大的应答体,为了占用内存最小,该指令必须设置为off

该指令默认值是on

该指令是在v0.5.0rc19版本首次引入的。

返回目录

English source:

lua_http10_buffering

syntax: lua_http10_buffering on|off

default: lua_http10_buffering on

context: http, server, location, location-if

Enables or disables automatic response buffering for HTTP 1.0 (or older) requests. This buffering mechanism is mainly used for HTTP 1.0 keep-alive which replies on a proper Content-Length response header.

If the Lua code explicitly sets a Content-Length response header before sending the headers (either explicitly via ngx.send_headers or implicitly via the first ngx.say or ngx.print call), then the HTTP 1.0 response buffering will be disabled even when this directive is turned on.

To output very large response data in a streaming fashion (via the ngx.flush call, for example), this directive MUST be turned off to minimize memory usage.

This directive is turned on by default.

This directive was first introduced in the v0.5.0rc19 release.

Back to TOC

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qizhendong_admin/nginx-lua-module-zh-wiki.git
git@gitee.com:qizhendong_admin/nginx-lua-module-zh-wiki.git
qizhendong_admin
nginx-lua-module-zh-wiki
nginx-lua-module-zh-wiki
master

搜索帮助