You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4552,9 +4552,9 @@ or a Lua table holding the query arguments' key-value pairs, as in
4552
4552
ngx.req.set_uri_args({ a=3, b="hello world" })
4553
4553
```
4554
4554
4555
-
In the former case, i.e., when the whole query-strng is provided directly,
4555
+
In the former case, i.e., when the whole query-string is provided directly,
4556
4556
the input Lua string should already be well-formed with the URI encoding.
4557
-
For security considerations, his method will autoamticaly escape any control and
4557
+
For security considerations, this method will automatically escape any control and
4558
4558
whitespace characters (ASCII code 0x00 ~ 0x32 and 0x7F) in the Lua string.
4559
4559
4560
4560
In the latter case, this method will escape argument keys and values according to the URI escaping rule.
@@ -4883,6 +4883,11 @@ ngx.req.set_header
4883
4883
4884
4884
Set the current request's request header named `header_name` to value `header_value`, overriding any existing ones.
4885
4885
4886
+
The input Lua string `header_name` and `header_value` should already be well-formed with the URI encoding.
4887
+
For security considerations, this method will automatically escape " ", """, "(", ")", ",", "/", ":", ";", "?",
4888
+
"<", "=", ">", "?", "@", "[", "]", "\", "{", "}", 0x00-0x1F, 0x7F-0xFF in `header_name` and automatically escape
4889
+
"0x00-0x08, 0x0A-0x0F, 0x7F in `header_value`.
4890
+
4886
4891
By default, all the subrequests subsequently initiated by [ngx.location.capture](#ngxlocationcapture) and [ngx.location.capture_multi](#ngxlocationcapture_multi) will inherit the new header.
4887
4892
4888
4893
Here is an example of setting the `Content-Type` header:
Copy file name to clipboardExpand all lines: doc/HttpLuaModule.wiki
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4084,6 +4084,11 @@ The <code>__index</code> metamethod will not be added when the <code>raw</code>
4084
4084
4085
4085
Set the current request's request header named <code>header_name</code> to value <code>header_value</code>, overriding any existing ones.
4086
4086
4087
+
The input Lua string `header_name` and `header_value` should already be well-formed with the URI encoding.
4088
+
For security considerations, this method will automatically escape " ", """, "(", ")", ",", "/", ":", ";", "?",
4089
+
"<", "=", ">", "?", "@", "[", "]", "\", "{", "}", 0x00-0x1F, 0x7F-0xFF in `header_name` and automatically escape
4090
+
"0x00-0x08, 0x0A-0x0F, 0x7F in `header_value`.
4091
+
4087
4092
By default, all the subrequests subsequently initiated by [[#ngx.location.capture|ngx.location.capture]] and [[#ngx.location.capture_multi|ngx.location.capture_multi]] will inherit the new header.
4088
4093
4089
4094
Here is an example of setting the <code>Content-Type</code> header:
0 commit comments