don't assume content type is given

This commit is contained in:
Mike McLean 2016-09-30 01:58:47 -04:00
parent 45dd3bf187
commit 6bbf9afdc8

View file

@ -750,7 +750,7 @@ def application(environ, start_response):
except Exception:
return offline_reply(start_response, msg="database outage")
h = ModXMLRPCRequestHandler(registry)
if environ['CONTENT_TYPE'] == 'application/octet-stream':
if environ.get('CONTENT_TYPE') == 'application/octet-stream':
response = h._wrap_handler(h.handle_upload, environ)
else:
response = h._wrap_handler(h.handle_rpc, environ)