comparison 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
comparison
equal deleted inserted replaced
5672:a7211712b110 5673:6b6bc8d31caf
375 env['PATH_INFO'] = urllib_.unquote(rest) 375 env['PATH_INFO'] = urllib_.unquote(rest)
376 if query: 376 if query:
377 env['QUERY_STRING'] = query 377 env['QUERY_STRING'] = query
378 if hasattr(self.headers, 'get_content_type'): 378 if hasattr(self.headers, 'get_content_type'):
379 # Python 3. We need the raw header contents. 379 # Python 3. We need the raw header contents.
380 env['CONTENT_TYPE'] = self.headers.get('content-type') 380 content_type = self.headers.get('content-type')
381 elif self.headers.typeheader is None: 381 elif self.headers.typeheader is None:
382 # Python 2. 382 # Python 2.
383 env['CONTENT_TYPE'] = self.headers.type 383 content_type = self.headers.type
384 else: 384 else:
385 # Python 2. 385 # Python 2.
386 env['CONTENT_TYPE'] = self.headers.typeheader 386 content_type = self.headers.typeheader
387 if content_type:
388 env['CONTENT_TYPE'] = content_type
387 length = self.headers.get('content-length') 389 length = self.headers.get('content-length')
388 if length: 390 if length:
389 env['CONTENT_LENGTH'] = length 391 env['CONTENT_LENGTH'] = length
390 if hasattr(self.headers, 'get_all'): 392 if hasattr(self.headers, 'get_all'):
391 # Python 3. 393 # Python 3.

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