On Friday, July 16, 2010, And Clover <and...@doxdesk.com> wrote: > On 07/14/2010 06:43 AM, Ian Bicking wrote: > > > There's only a couple tricky keys: SCRIPT_NAME, PATH_INFO, > and HTTP_COOKIE. > > > (And of those, PATH_INFO is the only one that really matters, in that no-one > really uses non-ASCII script filenames, and non-ASCII characters in > Cookie/Set-Cookie are still handled so differently/brokenly across browsers > that you can't rely on them at all.) > > > * I (re)propose we eliminate SCRIPT_NAME and PATH_INFO and replace them > exclusively with encoded versions > > > For compatibility with existing apps, how about keeping the existing > SCRIPT_NAME and PATH_INFO as-is (with all their problems), and specifying > that the new 'raw' versions (whatever they are called) are added only if they > really are raw, not reconstructed. > > Then existing scripts that don't care about non-ASCII and slashes can carry > on as before, and for apps that do care about them, they'll be able to be > *sure* the input is correct. Or they can fall back to PATH_INFO when not > present, and avoid producing these kind of URLs in response. > > (Or an app might have enough special knowledge to try other fallback > mechanisms when the raw versions are unavailable, such as REQUEST_URI or > Windows ctypes envvar hacking. But if the server/gateway has good raw paths > it shouldn't bother use these.)
Which is exactly what I have suggested in the past. If you do that, one has to ask the question, given it is more convention than anything, why it isn't just a x-wsgiorg extension specification like routing args is rather than a core part of the WSGI specification. Servers could still implement the extension as they are able to and don't have to worry about changing core specification then and what we have now stands. Graham > -- > And Clover > mailto:a...@doxdesk.com > http://www.doxdesk.com/ > _______________________________________________ > Web-SIG mailing list > Web-SIG@python.org > Web SIG: http://www.python.org/sigs/web-sig > Unsubscribe: > http://mail.python.org/mailman/options/web-sig/graham.dumpleton%40gmail.com > _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com