[Web-SIG] PEP 444 (aka Web3)

Ian Bicking ianb at colorstudy.com
Fri Sep 17 19:24:53 CEST 2010


On Fri, Sep 17, 2010 at 1:02 PM, Ian Bicking <ianb at colorstudy.com> wrote:

> I would really like to see concerns over bad gateways not be used to keep
> valuable information out of the spec.  We want people to use well-configured
> gateways that accurately represent requests.  There are limits, e.g., in
> environments where information is lost.  The only really problematic example
> is losing the distinction between %2f and /, and I think it's reasonable to
> suggest that applications should avoid making that distinction in the path
> if they want to be easily deployed in different environments.
>

Just to expand -- the reason %2f is special is because / has special meaning
in URL paths, or at least is treated as such.  ? has special meaning too,
but that's already handled by splitting off QUERY_STRING.  Technically ; is
supposed to mean something, but no one ever cared, so it doesn't really.  In
theory you could make any character special, and in doing so want an escape
mechanism to determine the difference between, e.g., "," and %2c... but no
one does that, so no problem.

All the other potential problems are problems of gateway corruption.  E.g.,
where the bytes were decoded with Latin1 and then encoded with
sys.getfilesystemencoding(), or some other mismatched combination.  I don't
believe we should expose gateway corruption to the spec.  I *do* believe
that we can build tools inside WSGI to help debug and fix those problems,
and I don't think any of these changes makes those tools particularly harder
to implement.

-- 
Ian Bicking  |  http://blog.ianbicking.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20100917/9df57488/attachment.html>


More information about the Web-SIG mailing list