Skip to content

Commit 051f352

Browse files
yandongxiaoagentzh
authored andcommitted
doc: setting ngx.header.HEADER no longer throws out an exception when the header is already sent out; it now just logs an error message.
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
1 parent 9a3bbb6 commit 051f352

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4121,7 +4121,7 @@ The same applies to assigning an empty table:
41214121
ngx.header["X-My-Header"] = {};
41224122
```
41234123

4124-
Setting `ngx.header.HEADER` after sending out response headers (either explicitly with [ngx.send_headers](#ngxsend_headers) or implicitly with [ngx.print](#ngxprint) and similar) will throw out a Lua exception.
4124+
Setting `ngx.header.HEADER` after sending out response headers (either explicitly with [ngx.send_headers](#ngxsend_headers) or implicitly with [ngx.print](#ngxprint) and similar) will log an error message.
41254125

41264126
Reading `ngx.header.HEADER` will return the value of the response header named `HEADER`.
41274127

doc/HttpLuaModule.wiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3406,7 +3406,7 @@ The same applies to assigning an empty table:
34063406
ngx.header["X-My-Header"] = {};
34073407
</geshi>
34083408
3409-
Setting <code>ngx.header.HEADER</code> after sending out response headers (either explicitly with [[#ngx.send_headers|ngx.send_headers]] or implicitly with [[#ngx.print|ngx.print]] and similar) will throw out a Lua exception.
3409+
Setting <code>ngx.header.HEADER</code> after sending out response headers (either explicitly with [[#ngx.send_headers|ngx.send_headers]] or implicitly with [[#ngx.print|ngx.print]] and similar) will log an error message.
34103410
34113411
Reading <code>ngx.header.HEADER</code> will return the value of the response header named <code>HEADER</code>.
34123412

0 commit comments

Comments
 (0)