[Web-SIG] Request for Comments on upcoming WSGI Changes

Alan Kennedy alan at xhaus.com
Tue Sep 22 09:00:13 CEST 2009


[Ian]
>> OK, another proposal entirely: we kill SCRIPT_NAME and PATH_INFO
>> introduce two equivalent variables that hold the NOT url-decoded values.

[Graham]
> That may be fine for pure Python web servers where you control the
> split of REQUEST_URI into SCRIPT_NAME and PATH_INFO in the first place
> but don't have that luxury in Apache or via FASTCGI/SCGI/CGI etc as
> that is done by the web server. Also, as pointed out in my blog,
> because of rewrites in web server, it may be difficult to try and map
> SCRIPT_NAME and PATH_INFO back into REQUEST_URI provided to try and
> reclaim original characters. There is also the problem that often
> FASTCGI totally stuffs up SCRIPT_NAME/PATH_INFO split anyway and
> manual overrides needed to tweak them.

This applies doubly under Java servlets, where different containers
take different approaches to solve these rather hard problems. It is
worth noting that they have to do so because the java servlet spec,
even under the most recent 2.5,  punts on *all* of the issues being
discussed here.

See here for how Tomcat does it. Or half does it, messily.

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

I know this is not helpful ;-)

Alan.


More information about the Web-SIG mailing list