This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aclover
Recipients aclover, eric.araujo, orsenthil, pje
Date 2010-11-04.03:55:02
SpamBayes Score 3.0550584e-08
Marked as misclassified No
Message-id <1288842909.89.0.640922860652.issue10155@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks.

Some of those additions in _needs_transcode are potentially controversial, though. I'm not wholly sure it's the right thing to transcode these.

Some of them may not actually come from the request, eg `REMOTE_USER` may be filled in by IIS's Windows authentication using a native-Unicode string from the Windows user database. Is it the right thing to turn it into UTF-8-bytes-in-Unicode for consistency with Apache? Maybe. (At least for most of the other new envvars there will never see a non-ASCII character. Or in `REMOTE_IDENT`'s case never be used for anything.)

The case with the REDIRECT_HTTP_ and SSL_ envvars is an interesting one. Whilst transcoding them at some point will very probably be what applications need to do if they want to actually use them, is it within CGIHandler's remit to change Apache mod-specific variables that are not specified by CGI or WSGI?

(There might, after all, be lots of these to catch for other mods and servers, and it's *conceivable* that somebody might be re-using one of these names to set in the environment for some other purpose, in which case transcoding would be adding an unexpected mangling. We can't in the general case expect users to know to avoid envvar names are used as non-standard extensions in all servers.)

REDIRECT_HTTP_ at least comes from the HTTP request, so I guess the consistency is good there. (But then I think the only header that actually may contain non-ASCII is REDIRECT_URL, which replaces the unescaped SCRIPT_NAME and PATH_INFO; that one isn't caught at the moment.)
History
Date User Action Args
2010-11-04 03:55:10acloversetrecipients: + aclover, pje, orsenthil, eric.araujo
2010-11-04 03:55:09acloversetmessageid: <1288842909.89.0.640922860652.issue10155@psf.upfronthosting.co.za>
2010-11-04 03:55:04acloverlinkissue10155 messages
2010-11-04 03:55:02aclovercreate