diff roundup/cgi/wsgi_handler.py @ 5823:edd9e2c67785

Make REST-API updates work with WSGI Now the Content-Type header is handled specially, it doesn't have a HTTP_ prefix in WSGI. Also make some form lookups more robust in rest.
author Ralf Schlatterbeck <rsc@runtux.com>
date Sun, 23 Jun 2019 14:46:05 +0200
parents e7b30ab60941
children 883c9e90b403
line wrap: on
line diff
--- a/roundup/cgi/wsgi_handler.py	Fri Jun 21 18:20:06 2019 +0200
+++ b/roundup/cgi/wsgi_handler.py	Sun Jun 23 14:46:05 2019 +0200
@@ -28,7 +28,12 @@
         self.environ = environ
 
     def mangle_name(self, name):
+        """ Content-Type is handled specially, it doesn't have a HTTP_
+            prefix in cgi.
+        """
         n = name.replace('-', '_').upper()
+        if n == 'CONTENT_TYPE':
+            return n
         return 'HTTP_' + n
 
     def get(self, name, default = None):

Roundup Issue Tracker: http://roundup-tracker.org/