[Web-SIG] URL quoting in WSGI (or the lack therof)

Robert Brewer fumanchu at aminus.org
Wed Jan 23 18:15:58 CET 2008


James Y Knight wrote:
> ...as there is simply no way to represent "some%2Fthing/
> shallow/" with PATH_INFO, as specified in the CGI spec, the only
> alternative is to reject the request. This is what the major servers
> do today.
>
> > Anyone else thinks it's a bug in WSGI too?
> 
> WSGI is based upon CGI and inherits this behavior. I suppose a WSGI-
> specific fix could be done. However, there are good reasons for
> inheriting behavior from CGI, most importantly, ease of integration.
> Servers already implement this behavior for CGI SCGI FastCGI PHP, and
> now, WSGI. None of the previous have seen it as important enough an
> issue to change this behavior, and neither do I think it important
> enough for WSGI.
> 
> So, no, I don't consider it a bug in WSGI. You could call it a bug in
> CGI if you like. Good luck getting it changed.

I consider it a bug in both, and the difficulty level of changing the
CGI behavior really has no bearing on our decision to do better with
WSGI. I think it's important that we allow the full range of URI's to be
accepted. If you go and stick Apache in front of your WSGI app, it will
still 404, sure; but that's your choice to use Apache or not. There's no
sense making WSGI a least common denominator, inheriting all the
limitations of all the existing web servers.


Robert Brewer
fumanchu at aminus.org



More information about the Web-SIG mailing list