Welcome! Log In Create A New Profile

Advanced

Re: Problem with uWSGI and PATH_INFO

July 28, 2017 03:28AM
> Hi Roberto,
>
> Le 2017-07-27 à 13:45, Roberto De Ioris a écrit :
>>
>> by using something like this (in the config, tune the regexps as
>> required):
>>
>> [uwsgi]
>> route = ^/(.+?)/(.+)$ setscriptname:/$1
>> route = ^/(.+?)/(.+)$ setpathinfo:/$2
>>
> I use a dynamic regex URL resolver to resolve a request URI to a
> callback function. Also I prefer avoiding to modify uWSGI internal
> routing system for my basic use-case.


Sorry, but someone (nginx or uWSGI) must be informed of your needs (like
Francis explained yesterday). What you consider a 'basic use-case', it is
absolutely not in this specific scenario where you want to map some form
of namespace (like SCRIPT_NAME). The 'basic use case' here is the app
mounted under the root. It is only a lucky coincidence that the fastcgi
hack exposed by nginx (that came from a php need) has been handy for you.
You could even use uWSGI in fastcgi mode. Maybe you have been confused by
the 'uwsgi' name of the protocol (yes, unfortunate choice made 8 years ago
:( ). It has nothing to do with the python WSGI standard, it is only a
transport protocol. It is the backend app that gives meaning to data.

I have no choice to fallback on
> using fastcgi until this is fixed either in nginx or uWSGI.


frankly speaking, there is nothing to fix in uWSGI because it already
honours what the webserver passes to it and eventually (via routing or
code) it is able to rewrite it if the webserver cannot make assumptions. I
have shown at least 3 ways to deal with this, i have literally no idea of
other solutions :)

and honestly, i do not think nginx should add ad-hoc use cases to the
uwsgi protocol (that is a simple dictionary serializer protocol and should
never interpret its content). But obviously this second part is up to the
nginx developers ;)


--
Roberto De Ioris
http://unbit.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 07:48AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 08:54AM

Re: Problem with uWSGI and PATH_INFO

roberto July 27, 2017 09:02AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 09:20AM

Re: Problem with uWSGI and PATH_INFO

roberto July 27, 2017 09:54AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 10:22AM

Re: Problem with uWSGI and PATH_INFO

roberto July 27, 2017 11:26AM

Re: Problem with uWSGI and PATH_INFO

Francis Daly July 27, 2017 11:26AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 12:08PM

Re: Problem with uWSGI and PATH_INFO

roberto July 27, 2017 12:50PM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 01:06PM

Re: Problem with uWSGI and PATH_INFO

roberto July 27, 2017 01:46PM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 27, 2017 05:42PM

Re: Problem with uWSGI and PATH_INFO

roberto July 28, 2017 03:28AM

Re: Problem with uWSGI and PATH_INFO

Francis Daly July 28, 2017 03:18AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard July 29, 2017 06:10AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard August 05, 2017 11:50AM

Re: Problem with uWSGI and PATH_INFO

Francis Daly August 06, 2017 06:00AM

Re: Problem with uWSGI and PATH_INFO

roberto August 06, 2017 06:30AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard August 06, 2017 06:54AM

Re: Problem with uWSGI and PATH_INFO

roberto August 06, 2017 10:12AM

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard August 07, 2017 05:08AM

Re: Problem with uWSGI and PATH_INFO

Francis Daly August 08, 2017 02:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
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