Disassembler 2020-04-18 19:16:55 +02:00
parent 50e6ec1c3a
commit 52016223ab
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -9,6 +9,25 @@
if not gluon.fileutils.check_credentials(request): if not gluon.fileutils.check_credentials(request):
raise HTTP(401, web2py_error='invalid credentials') raise HTTP(401, web2py_error='invalid credentials')
stdout = sys.stdout stdout = sys.stdout
--- gluon/globals.py
+++ gluon/globals.py
@@ -241,7 +241,15 @@
# parse POST variables on POST, PUT, BOTH only in post_vars
if body and not is_json and env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH'):
query_string = env.pop('QUERY_STRING', None)
- dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
+ content_disposition = env.get('HTTP_CONTENT_DISPOSITION')
+ if content_disposition:
+ headers = {'content-disposition': content_disposition,
+ 'content-type': env['CONTENT_TYPE'],
+ 'content-length': env['CONTENT_LENGTH'],
+ }
+ else:
+ headers = None
+ dpost = cgi.FieldStorage(fp=body, environ=env, headers=headers, keep_blank_values=1)
try:
post_vars.update(dpost)
except:
--- gluon/languages.py --- gluon/languages.py
+++ gluon/languages.py +++ gluon/languages.py
@@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@