Mercurial > p > roundup > code
diff roundup/scripts/roundup_server.py @ 5673:6b6bc8d31caf
Merged
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Mon, 25 Mar 2019 19:47:29 +0100 |
| parents | 5ad31de777a8 |
| children | 320a1692a473 |
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py Mon Mar 25 19:46:20 2019 +0100 +++ b/roundup/scripts/roundup_server.py Mon Mar 25 19:47:29 2019 +0100 @@ -377,13 +377,15 @@ env['QUERY_STRING'] = query if hasattr(self.headers, 'get_content_type'): # Python 3. We need the raw header contents. - env['CONTENT_TYPE'] = self.headers.get('content-type') + content_type = self.headers.get('content-type') elif self.headers.typeheader is None: # Python 2. - env['CONTENT_TYPE'] = self.headers.type + content_type = self.headers.type else: # Python 2. - env['CONTENT_TYPE'] = self.headers.typeheader + content_type = self.headers.typeheader + if content_type: + env['CONTENT_TYPE'] = content_type length = self.headers.get('content-length') if length: env['CONTENT_LENGTH'] = length
