Hackfix Sahana's Web2Py gis/proxy
https://github.com/sahana/eden_deploy/commit/5f1d8d8b2 https://github.com/web2py/web2py/issues/2262
This commit is contained in:
parent
50e6ec1c3a
commit
52016223ab
@ -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 @@
|
||||||
|
Loading…
Reference in New Issue
Block a user