Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uwsgi not honoring request method in nginx subrequest #222

Closed
amotl opened this issue Apr 10, 2013 · 1 comment
Closed

uwsgi not honoring request method in nginx subrequest #222

amotl opened this issue Apr 10, 2013 · 1 comment

Comments

@amotl
Copy link

amotl commented Apr 10, 2013

Hey there,

while switching our Python WSGI Pyramid application stack
to uWSGI behind OpenResty we hit a road block when issuing
subrequests from Lua to the uWSGI application.

The code in ngx_http_uwsgi_module.c does not seem to honor
the request method when being in the context of a subrequest.
Instead, it seems to inherit the request method of the origin
request.

We're using OpenResty 1.2.6.6 (Nginx 1.2.6), however switching
to OpenResty 1.2.7.5 (Nginx 1.2.7) makes no difference.

We filed this issue to nginx core as well [1] since the module ngx_http_uwsgi_module.c seems to be maintained there, but nevertheless we wanted to notice you as well.

We prepared a wash & go buildout environment and a summary to reproduce this issue:

Thanks for looking into this!

Cheers,
Andreas.

[1] http://trac.nginx.org/nginx/ticket/332

@amotl
Copy link
Author

amotl commented Apr 10, 2013

The solution to this issue is quite easy by simply doing:

uwsgi_param REQUEST_METHOD $echo_request_method;

See also: http://trac.nginx.org/nginx/ticket/332#comment:1

Thanks Maxim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant