Sub-request using Parent Request Body

agentzh agentzh at gmail.com
Thu Jan 6 08:13:17 MSK 2011


On Thu, Jan 6, 2011 at 1:02 PM, agentzh <agentzh at gmail.com> wrote:
>            local res = ngx.location.capture(
>                "/check-spam",
>                { method = "POST", body = ngx.var.request_body }
>            )

Sorry...these lines should have been

            local res = ngx.location.capture(
                "/check-spam",
                { method = ngx.HTTP_POST, body = ngx.var.request_body }
            )

That is, the "method" argument should be a constant specified by
ngx.HTTP_POST. See the documentation of ngx_lua for more details :)

Cheers,
-agentzh



More information about the nginx mailing list