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

Can't fully utilize TUS protocol #4839

Closed
2 tasks
yasakova-anastasia opened this issue Aug 25, 2022 · 4 comments · Fixed by #5204
Closed
2 tasks

Can't fully utilize TUS protocol #4839

yasakova-anastasia opened this issue Aug 25, 2022 · 4 comments · Fixed by #5204
Assignees
Labels
bug Something isn't working server

Comments

@yasakova-anastasia
Copy link
Contributor

yasakova-anastasia commented Aug 25, 2022

My actions before raising this issue

Expected Behaviour

Current Behaviour

TUS protocol supposes a leading HEAD request to retrieve file state on the server. Server supports this, but traefik converts these HEAD requests to GET, and then server rejects it. Thus, we cannot continue an interrupted file uploading.

Workaround: both UI and SDK always send files from scratch. It leads to:

  • more user traffic
  • possible filename conflicts (partially uploaded files are not autoremoved)

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Issue by @zhiltsov-max

@yasakova-anastasia yasakova-anastasia added the bug Something isn't working label Aug 25, 2022
@SpecLad SpecLad self-assigned this Oct 27, 2022
@SpecLad
Copy link
Contributor

SpecLad commented Oct 28, 2022

After investigation, I found out that traefik is innocent. The one converting the requests is actually mod_wsgi, as explained here. I'm currently investigating if it would be safe to turn this functionality off (I believe it should be).

@zhiltsov-max
Copy link
Contributor

Great news! The checks in the function suggest to look at the configuration parameters.

@SpecLad
Copy link
Contributor

SpecLad commented Oct 29, 2022

@zhiltsov-max The description says that there's a workaround in the UI to always send files from scratch, but I don't see where this workaround is implemented. It seems like the UI just uses tus-js-client normally. Does this workaround actually exist?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Oct 29, 2022

@SpecLad. Speaking about UI, I don't remember checking the library itself (maybe I did, but I just don't remember). I see there is a comment about the implementation that "we try, and if it fails, we start from scratch".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants