Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Uploads fail when there's no Content-Length header #5322

Closed
turt2live opened this issue Jun 3, 2019 · 1 comment
Closed

Uploads fail when there's no Content-Length header #5322

turt2live opened this issue Jun 3, 2019 · 1 comment

Comments

@turt2live
Copy link
Member

This header is not required.

2019-06-03 09:10:14,485 - synapse.http.server - 112 - ERROR - POST-23730- Failed handle request via 'UploadResource': <XForwardedForRequest at 0x7ff60923acc0 method='POST' uri='/_matrix/media/v1/upload?filename=image001.png&access_token=<redacted>' clientproto='HTTP/1.1' site=8008>
Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/opt/venvs/matrix-synapse/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.6/site-packages/synapse/rest/media/v1/upload_resource.py", line 58, in _async_render_POST
    content_length = request.getHeader(b"Content-Length").decode('ascii')
AttributeError: 'NoneType' object has no attribute 'decode'
@richvdh
Copy link
Member

richvdh commented Apr 24, 2020

dup #5114

@richvdh richvdh closed this as completed Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants