diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index 5ef9271b..528c3f21 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -1343,6 +1343,7 @@ def handle_staging(pathcomponents, operation, configmanager, inputdata): datachunk = filedata['wsgi.input'].read(min(chunk_size, remaining_length)) f.write(datachunk) remaining_length -= len(datachunk) + eventlet.sleep(0) yield msg.FileUploadProgress(progress) yield msg.FileUploadProgress(100) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index 5b00f4a8..7a40a988 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -681,7 +681,7 @@ def resourcehandler_backend(env, start_response): start_response('302 Found', headers) yield '' return - if 'CONTENT_LENGTH' in env and int(env['CONTENT_LENGTH']) > 0: + if 'CONTENT_LENGTH' in env and int(env['CONTENT_LENGTH']) > 0 and not '/staging' in env['PATH_INFO']: reqbody = env['wsgi.input'].read(int(env['CONTENT_LENGTH'])) reqtype = env['CONTENT_TYPE'] operation = opmap.get(env['REQUEST_METHOD'], None)