[Web-SIG] FYI: Changes to PEP 333 and wsgiref
Phillip J. Eby
pje at telecommunity.com
Sun Oct 17 15:47:03 CEST 2004
I noticed today that the "URL Reconstruction" algorithm in the PEP (which I
also copied into wsgiref) is incorrect. HTTP_HOST (aka the 'Host:' header)
can contain a port, if it's not the default port for the corresponding
protocol. So, SERVER_PORT should not be appended to it in that case. I've
fixed the PEP and wsgiref. (The PEP update should be visible on python.org
within an hour or two.)
In addition, I've also updated the PEP to make SERVER_PROTOCOL a required
environ variable. It's impossible to comply with the HTTP RFC's if you
don't know what HTTP version the client is using. (Despite its name,
SERVER_PROTOCOL is actually the *client* protocol: "the name and revision
of the information protocol with which the request arrived", according to
the CGI spec.)
Finally, while making the updates, I also added a notation to the effect
that 'wsgi.errors' is intended to be a "text mode" file. This was always
the intent, but the fact wasn't documented.
More information about the Web-SIG
mailing list