Nginx User
October 15, 2011 12:16PM
On 13 October 2011 04:34, agentzh <agentzh@gmail.com> wrote:
> BTW, you could have written the Lua code like this:
>
> local m = ngx.re.match(ngx.var.request_method, "GET|POST|HEAD", "io")
> if not m then
>    ngx.exit(400)
> end
Does ngx_lua support the appropriate "501 Not Implemented" for this?
A search took me to ngx_http_lua_consts.c but it doesn't seem to be there.

Also didn't realise I could use the actual code instead of a constant.

Is it possible to issue any status code or are we limited to those in
ngx_http_lua_consts.c?

Cheers.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

HTTP Status Headers

Nginx User October 15, 2011 12:16PM

Re: HTTP Status Headers

agentzh October 15, 2011 07:04PM

Re: HTTP Status Headers

Nginx User October 16, 2011 12:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 247
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready