SVN: r25256 - trunk/quixote/server

Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Tue, 5 Oct 2004 12:28:48 -0400
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: nascheme
Date: 2004-10-05 12:03:38 -0400 (Tue, 05 Oct 2004)
New Revision: 25256

Modified:
   trunk/quixote/server/medusa_http.py
Log:
Simplify propagation of HTTP headers.


Modified: trunk/quixote/server/medusa_http.py
===================================================================
--- trunk/quixote/server/medusa_http.py	2004-10-05 15:26:43 UTC (rev 25255)
+++ trunk/quixote/server/medusa_http.py	2004-10-05 16:03:38 UTC (rev 25256)
@@ -80,9 +80,6 @@
                    'CONTENT_TYPE': msg.get('Content-type'),
                    'CONTENT_LENGTH': len(data),
                    "GATEWAY_INTERFACE": "CGI/1.1",
-                   'HTTP_COOKIE': msg.get('Cookie'),
-                   'HTTP_REFERER': msg.get('Referer'),
-                   'HTTP_USER_AGENT': msg.get('User-agent'),
                    'PATH_INFO': path,
                    'QUERY_STRING': query_string,
                    'REMOTE_ADDR': remote_addr,
@@ -96,11 +93,8 @@
                    'SERVER_SOFTWARE': self.server_name,
                    }
 
-        # Propagate HTTP headers - copied from twisted_http.py
         for title, header in msg.items():
             envname = title.replace('-', '_').upper()
-            if title not in ('content-type', 'content-length'):
-                envname = "HTTP_" + envname
             environ[envname] = header
         for k,v in environ.items():
             if v == None: