Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/ngx_http_lua_socket_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4084,14 +4084,6 @@ ngx_http_lua_req_socket(lua_State *L)
}
#endif

#if nginx_version >= 1003009
if (!raw && r->headers_in.chunked) {
lua_pushnil(L);
lua_pushliteral(L, "chunked request bodies not supported yet");
return 2;
}
#endif

ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module);
if (ctx == NULL) {
return luaL_error(L, "no ctx found");
Expand Down Expand Up @@ -4175,7 +4167,11 @@ ngx_http_lua_req_socket(lua_State *L)

dd("req content length: %d", (int) r->headers_in.content_length_n);

#if nginx_version >= 1003009
if (!r->headers_in.chunked && r->headers_in.content_length_n <= 0) {
#else
if (r->headers_in.content_length_n <= 0) {
#endif
lua_pushnil(L);
lua_pushliteral(L, "no body");
return 2;
Expand Down