diff --git a/src/octoprint/server/util/tornado.py b/src/octoprint/server/util/tornado.py index 6837fbd5..5da04a79 100644 --- a/src/octoprint/server/util/tornado.py +++ b/src/octoprint/server/util/tornado.py @@ -134,8 +134,6 @@ class UploadStorageFallbackHandler(tornado.web.RequestHandler): body-less request, just calls the `fallback` with an empty body and finishes the request. """ if self.request.method in UploadStorageFallbackHandler.BODY_METHODS: - print("### In UploadStorageFallbackHandler.prepare, processing body: %r" % self.request) - self._bytes_left = self.request.headers.get("Content-Length", 0) self._content_type = self.request.headers.get("Content-Type", None) @@ -158,8 +156,6 @@ class UploadStorageFallbackHandler(tornado.web.RequestHandler): else: self._multipart_boundary = None else: - print("### In UploadStorageFallbackHandler.prepare, invoking fallback: %r" % self.request) - self._fallback(self.request, b"") self._finished = True @@ -178,9 +174,6 @@ class UploadStorageFallbackHandler(tornado.web.RequestHandler): else: self._buffer = data - def on_finish(self): - pass - def is_multipart(self): """Checks whether this request is a `multipart` request""" return self._content_type is not None and self._content_type.startswith("multipart") @@ -373,6 +366,7 @@ class UploadStorageFallbackHandler(tornado.web.RequestHandler): try: # call the configured fallback with request and body to use self._fallback(self.request, body) + self._headers_written = True finally: # make sure the temporary files are removed again for f in self._files: @@ -417,8 +411,6 @@ class WsgiInputContainer(object): :param body: an optional body to use as `wsgi.input` instead of `request.body`, can be a string or a stream """ - print("### In WsgiInputContainer.__call__: %r" % request) - data = {} response = []