[Web-SIG] WSGI and Content-Type

Ian Bicking ianb at colorstudy.com
Thu Dec 29 17:27:14 CET 2005


Clark C. Evans wrote:
> I'm puzzled why CONTENT_TYPE/CONTENT_LENGTH is listed as an ``environ``
> CGI variable when it seems the corresponding corresponding
> HTTP_CONTENT_TYPE/HTTP_CONTENT_LENGTH would work.  Is there a reason for
> this redundancy?  Which one should I use?  If they differ, which one is
> correct? 

Probably HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH shouldn't be in 
there, and they should be ignored if they are in there.  CGI translates 
all headers by adding HTTP_, except for these two particular headers. 
WSGI is just following CGI on this one.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the Web-SIG mailing list