Welcome! Log In Create A New Profile

Advanced

Re: Problem with uWSGI and PATH_INFO

Etienne Robillard
July 27, 2017 12:08PM
Hi all,

Le 2017-07-27 à 11:25, Francis Daly a écrit :
> On Thu, Jul 27, 2017 at 07:45:28AM -0400, Etienne Robillard wrote:
>
> Hi there,
>
>> I'm not sure I understand the logic of this. Can someone please
>> explain why the variable PATH_INFO is set to $document_uri in
>> uwsgi_params?
> My guess (without knowing the history):
>
> The uwsgi_params values are an example of what can be done. The
> combination of SCRIPT_NAME and PATH_INFO in that file is consistent, and
> is valid in some cases (that is, cases where the application corresponds
> to the "root" of the server).
Actually my problem is that SCRIPT_NAME is not defined in uwsgi_params.
SCRIPT_NAME is a mandatory environment variable as per HTTP/1.1 spec.
>
> No-one has reported that there is a problem and provided a fix.
That's a major issue. A standard WSGI application should be able to use
a uWSGI upstream server within the "/" location block without the need
to define any "mountpoints".

> In general, only the administrator knows what SCRIPT_NAME and PATH_INFO
> values are appropriate in any one case, so that's the person who should
> configure the two to match their particular case.
>
Correct. Attempting to rewrite PATH_INFO as DOCUMENT_URI seems not a
reliable solution for my simple use-case.

> Perhaps it would be useful for something similar to exist for uwsgi? The
> fact that it does not exist already suggests that no-one has enough of
> a need, to arrange that it be added.
A $uwsgi_script_name variable would be a worthy addition.
> I guess that a server-level "if" could "set" two variables that could be
> used to populate SCRIPT_NAME and PATH_INFO, until a uwsgi_split_path_info
> directive is introduced. And that might be enough to avoid the need for
> a dedicated directive.
>
> (Actually: perhaps fastcgi_split_path_info can be used directly, even
> in a location{} which does not do fastcgi_pass? It should be easy enough
> to test whether that can work.)
>
>
> The hard part is usually deciding what exactly is wanted. After that,
> the implementation can be considered.
>
> Good luck with it,
>
> f
Note that I don't use fastcgi_split_path_info. The only modification I
did to fastcgi_params is:
fastcgi_param SCRIPT_NAME $fastcgi_script_name
fastcgi_param PATH_INFO $fastcgi_script_name

Etienne

--
Etienne Robillard
tkadm30@yandex.com
http://www.isotopesoftware.ca/

_______________________________________________
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: 193
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