Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAV HTTPResponseError 500 when send files bigger than 10MB #288

Open
Brawn1 opened this issue Apr 4, 2024 · 0 comments
Open

DAV HTTPResponseError 500 when send files bigger than 10MB #288

Brawn1 opened this issue Apr 4, 2024 · 0 comments

Comments

@Brawn1
Copy link

Brawn1 commented Apr 4, 2024

If we send files bigger then 10 MB, the Client split the files in chunks and add this in header.
The Webdav from Owncloud response this with an DAV 500 Error.

To Reproduce this:

  • Python3.9
  • Owncloud 10.14.0
  • file bigger as 10MB
import owncloud

oc = owncloud.Client.from_public_link('https://cloud.example.com/s/JABC123', folder_password='secret', debug=True)

print('start upload 12m_test.img')

oc.upload_file(remote_path='/12m_test.img',  local_source_file='12m_test.img') 

print('Done')

start upload 12m_test.img
DAV request: PUT /12m_test.img-chunking-1712240400-2-0
Headers:  {'X-OC-MTIME': '1712240000', 'OC-CHUNKED': '1'}
DAV status: 500
Traceback (most recent call last):
  File "/home/guenter/pycharm-2022/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 9, in <module>
  File "/home/guenter/Entwicklung/2GetOnline/scansync/app.py", line 40, in upload_file
    self.drop_file(file_path=file_path)
  File "/home/guenter/Entwicklung/2GetOnline/scansync/app.py", line 35, in drop_file
    self.client.drop_file(file_path)
  File "/home/guenter/Entwicklung/2GetOnline/scansync/.venv/lib/python3.9/site-packages/owncloud/owncloud.py", line 408, in drop_file
    return self.put_file(destination, file_name)
  File "/home/guenter/Entwicklung/2GetOnline/scansync/.venv/lib/python3.9/site-packages/owncloud/owncloud.py", line 573, in put_file
    return self._put_file_chunked(
  File "/home/guenter/Entwicklung/2GetOnline/scansync/.venv/lib/python3.9/site-packages/owncloud/owncloud.py", line 681, in _put_file_chunked
    if not self._make_dav_request(
  File "/home/guenter/Entwicklung/2GetOnline/scansync/.venv/lib/python3.9/site-packages/owncloud/owncloud.py", line 1815, in _make_dav_request
    raise HTTPResponseError(res)
owncloud.owncloud.HTTPResponseError: HTTP error: 500

When i set chunked=False, then the Upload works.
I have tested this up to 50MB, with no Problem.

So i think, this is an issue with the DAV Chunked Protocol in the new Owncloud Version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant