Skip to content

Commit

Permalink
fix: fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
oowl committed Feb 28, 2024
1 parent 62d92d6 commit a191d90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5639,7 +5639,7 @@ Returns a read-only cosocket object that wraps the downstream connection. Only [

In case of error, `nil` will be returned as well as a string describing the error.

Due to the streaming nature of HTTP2 and HTTP3, When the downstream connection maintains a continuous stream (such as GRPC), a block will occur. The block time depends on the [client_body_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout) setting. After the timeout, all Lua codes will be skipped and a 408 status code will be returned. [#2286](https://github.com/openresty/lua-nginx-module/pull/2286)
Note: This method will block while waiting for client request to be fully received. The block time depends on the [client_body_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout) directive and maximum body size specified by the [client_max_body_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) directive. If read timeout occurs or client body size exceeds the defined limit, this function will not return and 408 Request Time-out or 413 Request Entity Too Large response will be returned to the client instead.

The socket object returned by this method is usually used to read the current request's body in a streaming fashion. Do not turn on the [lua_need_request_body](#lua_need_request_body) directive, and do not mix this call with [ngx.req.read_body](#ngxreqread_body) and [ngx.req.discard_body](#ngxreqdiscard_body).

Expand Down
3 changes: 1 addition & 2 deletions doc/HttpLuaModule.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -4741,8 +4741,7 @@ Returns a read-only cosocket object that wraps the downstream connection. Only [
In case of error, <code>nil</code> will be returned as well as a string describing the error.
Due to the streaming nature of HTTP2 and HTTP3, When the downstream connection maintains a continuous stream (such as GRPC), a block will occur. The block time depends on the [http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout client_body_timeout] setting. After the timeout, all Lua codes will be skipped and a 408 status code will be returned. [https://github.com/openresty/lua-nginx-module/pull/2286 #2286]
Note: This method will block while waiting for client request to be fully received. The block time depends on the [http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout client_body_timeout] directive and maximum body size specified by the [http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size client_max_body_size] directive. If read timeout occurs or client body size exceeds the defined limit, this function will not return and 408 Request Time-out or 413 Request Entity Too Large response will be returned to the client instead.
The socket object returned by this method is usually used to read the current request's body in a streaming fashion. Do not turn on the [[#lua_need_request_body|lua_need_request_body]] directive, and do not mix this call with [[#ngx.req.read_body|ngx.req.read_body]] and [[#ngx.req.discard_body|ngx.req.discard_body]].
If any request body data has been pre-read into the Nginx core request header buffer, the resulting cosocket object will take care of this to avoid potential data loss resulting from such pre-reading.
Expand Down

0 comments on commit a191d90

Please sign in to comment.