Hello!

On Wed, Dec 23, 2015 at 07:10:43PM +0300, Руслан Закиров wrote:

> On Wed, Dec 23, 2015 at 6:49 PM, Maxim Dounin <mdou...@mdounin.ru> wrote:
> 
> > X-Accel-Redirect changes a request from POST to GET.
> >
> 
> No, it doesn't. Getting request method POST on the backend and even form
> data is intact.

It does,
http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_upstream.c#l2501:

            if (r->method != NGX_HTTP_HEAD) {
                r->method = NGX_HTTP_GET;
            }

Though it looks like it only does so for nginx itself, and this 
indeed looks like a bug.  The code should be similar to one in 
error_page handling:

        if (r->method != NGX_HTTP_HEAD) {
            r->method = NGX_HTTP_GET;
            r->method_name = ngx_http_core_get_method;
        }

If you want to get request and request method intact, use 
X-Accel-Redirect to a named location instead.

-- 
Maxim Dounin
http://nginx.org/

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

Reply via email to