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

Unable to upload chunked big file using requests python library. #290

Closed
Ph0tonic opened this issue Jul 20, 2023 · 2 comments · Fixed by #291
Closed

Unable to upload chunked big file using requests python library. #290

Ph0tonic opened this issue Jul 20, 2023 · 2 comments · Fixed by #291
Labels

Comments

@Ph0tonic
Copy link
Contributor

Ph0tonic commented Jul 20, 2023

Describe the bug
I am trying to upload big files to this webdav server by using requests library. Other available libraries are not compatible with the way I receive the stream of data. However, the webdav server hangs forever and do not respond.

To Reproducexx
Steps to reproduce the behavior:

  1. Launch a webdav server wsgidav --host=127.0.0.1 --port=31102 --root=/tmp --auth=anonymous
  2. Generate a big file dd if=/dev/random of=data_big bs=1M count=100
  3. Upload it to the webdav server
import requests
def generate():
    with open("data","rb") as f:
       while r:=f.read(1024**2):
          yield r
requests.put("http://127.0.0.1:31102/data", data=generate())
  1. The upload hangs forever

Expected behavior

A working upload of the file.

Screenshots, Log-Files, Stacktrace

Running without configuration file.
13:54:26.097 - WARNING : App wsgidav.mw.cors.Cors(None).is_disabled() returned True: skipping.
13:54:26.101 - INFO    : WsgiDAV/4.2.0 Python/3.9.17 Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.28
13:54:26.102 - INFO    : Lock manager:      LockManager(LockStorageDict)
13:54:26.102 - INFO    : Property manager:  None
13:54:26.102 - INFO    : Domain controller: SimpleDomainController()
13:54:26.102 - INFO    : Registered DAV providers by route:
13:54:26.102 - INFO    :   - '/:dir_browser': FilesystemProvider for path '/root/.cache/pypoetry/virtualenvs/downloadservice-xTUGyw3C-py3.9/lib/python3.9/site-packages/wsgidav/dir_browser/htdocs' (Read-Only) (anonymous)
13:54:26.102 - INFO    :   - '/': FilesystemProvider for path '/tmp' (Read-Write) (anonymous)
13:54:26.102 - WARNING : Basic authentication is enabled: It is highly recommended to enable SSL.
13:54:26.103 - WARNING : Share '/' will allow anonymous write access.
13:54:26.103 - WARNING : Share '/:dir_browser' will allow anonymous read access.
13:54:26.103 - WARNING : Could not import lxml: using xml instead (up to 10% slower). Consider `pip install lxml`(see https://pypi.python.org/pypi/lxml).
13:54:26.145 - INFO    : Running WsgiDAV/4.2.0 Cheroot/10.0.0 Python 3.9.17
13:54:26.145 - INFO    : Serving on http://127.0.0.1:31102 ...
13:57:14.931 - DEBUG   : check_write_permission(/data, 0, [], )
13:57:14.931 - DEBUG   :   checking /

Environment:
Using the python:3.9-slim-buster docker image

WsgiDAV/4.2.0 Python/3.9.17(64 bit) Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.28
Python from: /usr/local/bin/python

Which WSGI server was used (cheroot, ext-wsgiutils, gevent, gunicorn, paste, uvicorn, wsgiref, ...)?

Which WebDAV client was used (MS File Explorer, MS Office, macOS Finder, WinSCP, Windows, file mapping, ...)? No official clients, the requests python library.

Additional context
Add any other context about the problem here.

Thanks you very much for your help.

@Ph0tonic Ph0tonic added the bug label Jul 20, 2023
@Ph0tonic Ph0tonic changed the title Unable to upload a big file using requests python library. Unable to upload chunked big file using requests python library. Jul 21, 2023
@Ph0tonic
Copy link
Contributor Author

Hello,
Any plan plan to release a new official version including this fix ?
For now, I am still using my fork but I would love to use the official one.
Thanks

@mar10
Copy link
Owner

mar10 commented Sep 13, 2023

Sorry, I cannot give an ETA at the moment. Hopefully October...

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

Successfully merging a pull request may close this issue.

2 participants