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
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4888,7 +4888,7 @@ This function returns `nil` if
4888
4888
1. the request body has been read into disk temporary files,
4889
4889
1. or the request body has zero size.
4890
4890
4891
-
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turned on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however).
4891
+
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turn on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however).
4892
4892
4893
4893
If the request body has been read into disk files, try calling the [ngx.req.get_body_file](#ngxreqget_body_file) function instead.
4894
4894
@@ -4912,7 +4912,7 @@ Retrieves the file name for the in-file request body data. Returns `nil` if the
4912
4912
4913
4913
The returned file is read only and is usually cleaned up by Nginx's memory pool. It should not be manually modified, renamed, or removed in Lua code.
4914
4914
4915
-
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turned on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however).
4915
+
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turn on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however).
4916
4916
4917
4917
If the request body has been read into memory, try calling the [ngx.req.get_body_data](#ngxreqget_body_data) function instead.
4918
4918
@@ -4932,7 +4932,9 @@ ngx.req.set_body_data
4932
4932
4933
4933
Set the current request's request body using the in-memory data specified by the `data` argument.
4934
4934
4935
-
If the current request's request body has not been read, then it will be properly discarded. When the current request's request body has been read into memory or buffered into a disk file, then the old request body's memory will be freed or the disk file will be cleaned up immediately, respectively.
4935
+
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turn on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by [ngx.req.discard_body](#ngxreqdiscard_body).
4936
+
4937
+
Whether the previous request body has been read into memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively.
4936
4938
4937
4939
This function was first introduced in the `v0.3.1rc18` release.
4938
4940
@@ -4948,11 +4950,13 @@ ngx.req.set_body_file
4948
4950
4949
4951
Set the current request's request body using the in-file data specified by the `file_name` argument.
4950
4952
4953
+
If the request body has not been read yet, call [ngx.req.read_body](#ngxreqread_body) first (or turn on [lua_need_request_body](#lua_need_request_body) to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by [ngx.req.discard_body](#ngxreqdiscard_body).
4954
+
4951
4955
If the optional `auto_clean` argument is given a `true` value, then this file will be removed at request completion or the next time this function or [ngx.req.set_body_data](#ngxreqset_body_data) are called in the same request. The `auto_clean` is default to `false`.
4952
4956
4953
4957
Please ensure that the file specified by the `file_name` argument exists and is readable by an Nginx worker process by setting its permission properly to avoid Lua exception errors.
4954
4958
4955
-
If the current request's request body has not been read, then it will be properly discarded. When the current request's request body has been read into memory or buffered into a disk file, then the old request body's memory will be freed or the disk file will be cleaned up immediately, respectively.
4959
+
Whether the previous requestbody has been readinto memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively.
4956
4960
4957
4961
This function was first introduced in the `v0.3.1rc18` release.
Copy file name to clipboardExpand all lines: doc/HttpLuaModule.wiki
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4071,7 +4071,7 @@ This function returns <code>nil</code> if
4071
4071
# the request body has been read into disk temporary files,
4072
4072
# or the request body has zero size.
4073
4073
4074
-
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turned on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however).
4074
+
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turn on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however).
4075
4075
4076
4076
If the request body has been read into disk files, try calling the [[#ngx.req.get_body_file|ngx.req.get_body_file]] function instead.
4077
4077
@@ -4092,7 +4092,7 @@ Retrieves the file name for the in-file request body data. Returns <code>nil</co
4092
4092
4093
4093
The returned file is read only and is usually cleaned up by Nginx's memory pool. It should not be manually modified, renamed, or removed in Lua code.
4094
4094
4095
-
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turned on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however).
4095
+
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turn on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however).
4096
4096
4097
4097
If the request body has been read into memory, try calling the [[#ngx.req.get_body_data|ngx.req.get_body_data]] function instead.
4098
4098
@@ -4109,7 +4109,9 @@ See also [[#ngx.req.get_body_data|ngx.req.get_body_data]].
4109
4109
4110
4110
Set the current request's request body using the in-memory data specified by the <code>data</code> argument.
4111
4111
4112
-
If the current request's request body has not been read, then it will be properly discarded. When the current request's request body has been read into memory or buffered into a disk file, then the old request body's memory will be freed or the disk file will be cleaned up immediately, respectively.
4112
+
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turn on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by [[#ngx.req.discard_body|ngx.req.discard_body]].
4113
+
4114
+
Whether the previous request body has been read into memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively.
4113
4115
4114
4116
This function was first introduced in the <code>v0.3.1rc18</code> release.
4115
4117
@@ -4122,11 +4124,13 @@ See also [[#ngx.req.set_body_file|ngx.req.set_body_file]].
4122
4124
4123
4125
Set the current request's request body using the in-file data specified by the <code>file_name</code> argument.
4124
4126
4127
+
If the request body has not been read yet, call [[#ngx.req.read_body|ngx.req.read_body]] first (or turn on [[#lua_need_request_body|lua_need_request_body]] to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by [[#ngx.req.discard_body|ngx.req.discard_body]].
4128
+
4125
4129
If the optional <code>auto_clean</code> argument is given a <code>true</code> value, then this file will be removed at request completion or the next time this function or [[#ngx.req.set_body_data|ngx.req.set_body_data]] are called in the same request. The <code>auto_clean</code> is default to <code>false</code>.
4126
4130
4127
4131
Please ensure that the file specified by the <code>file_name</code> argument exists and is readable by an Nginx worker process by setting its permission properly to avoid Lua exception errors.
4128
4132
4129
-
If the current request's request body has not been read, then it will be properly discarded. When the current request's request body has been read into memory or buffered into a disk file, then the old request body's memory will be freed or the disk file will be cleaned up immediately, respectively.
4133
+
Whether the previous requestbody has been readinto memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively.
4130
4134
4131
4135
This function was first introduced in the <code>v0.3.1rc18</code> release.
0 commit comments