[Web-SIG] WSGI unquoting rules

Phillip J. Eby pje at telecommunity.com
Mon Aug 7 02:50:06 CEST 2006


At 05:05 PM 8/6/2006 -0700, Robert Brewer wrote:
>Content-class: urn:content-classes:message
>Content-Type: multipart/alternative;
>         boundary="----_=_NextPart_001_01C6B9B5.2CCFFA4A"
>
>PEP 333 doesn't directly state whether a WSGI server should unquote the 
>path or the query string before setting SCRIPT_NAME, PATH_INFO, and 
>QUERY_STRING. The "URL Reconstruction" section assumes that the path has 
>been unquoted but not the query string, as do wsgiref.simpleserver and 
>most other WSGI servers in the wild.
>
>Shouldn't the spec define this explicitly?

These values are defined by the CGI spec, not the WSGI spec, which 
incorporates the rules of the CGI spec for these variables.  See the 
References section at the end of the PEP.

A bit of Googling reveals, by the way, that the Internet-Draft referenced 
by the PEP has been superseded by an actual RFC for CGI 1.1:

     http://www.ietf.org/rfc/rfc3875

Apparently this came out after PEP 333 was basically finished, but should 
probably be updated to reference it in place of the CGI 1.1 draft spec.



More information about the Web-SIG mailing list