[Web-SIG] WSGI & CGI spec
Jason Kirtland
jason at virtuous.com
Wed Dec 20 01:50:15 CET 2006
Phillip wrote:
> At 03:36 PM 12/19/2006 -0800, Jason Kirtland wrote:
>> To my reading, PEP 333 implies that a server should plop the
>> Request-URI into PATH_INFO, and it should store it there
>> unmolested.
>
> That's only the case if the address of the application is the
> root of the server, and then only if the request URI is a path,
> rather than an absolute URI.
What would a server do with an absolute URI vs. abs_path, if not
place it in PATH_INFO? Or '*', for that matter? Should these
types of requests be handleable by a WSGI stack? Apache augments
the CGI environment with a REQUEST_URI- if WSGI had one of these I
guess I'd expect to see non-path URIs there.
> Note that a CGI-to-WSGI or FastCGI-to-WSGI gateway (or a piece of
> routing middleware) will have a SCRIPT_NAME that designates the
> location of the target application. [...]
Agreed; see the footnote in my post. A gateway doesn't necessarily
have or want access to the Request-URI. I think the anti-fiddling
assertion applies here as well though- a WSGI gateway server
shouldn't pro-actively normalize SCRIPT_NAME or PATH_INFO that it's
pulling from upstream.
-Jason
More information about the Web-SIG
mailing list