Change http status line in openresty

80 views
Skip to first unread message

Nicolas Franck

unread,
Jan 31, 2018, 5:11:35 PM1/31/18
to openresty-en
Is it possible to change the HTTP status reason, the text is placed after the status code?

e.g. 

HTTP/1.1 200 OK

should become

HTTP/1.1 200 yes!

I read somewhere that the text next to the status code can be anything.

For now, I can only change the status code:

ngx.status = 200


Thibault Charbonnier

unread,
Jan 31, 2018, 5:25:25 PM1/31/18
to openre...@googlegroups.com
Hi,

Not currently, but there is a stale pull request for this:

https://github.com/openresty/lua-nginx-module/pull/870

In my opinion, it seems like a good addition, but I don't know if it is
desired or not.

Best,
Thibault
> --
> You received this message because you are subscribed to the Google
> Groups "openresty-en" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openresty-en...@googlegroups.com
> <mailto:openresty-en...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Nicolas Franck

unread,
Feb 9, 2018, 9:13:10 AM2/9/18
to openresty-en
Thanks for your answer. Looks like sometimes in the future ;-)
Reply all
Reply to author
Forward
0 new messages