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

webdav: introduce the compatibility of non-standard webdav server implementations. #4618

Closed
Kilerd opened this issue May 16, 2024 · 2 comments · Fixed by #4631
Closed

webdav: introduce the compatibility of non-standard webdav server implementations. #4618

Kilerd opened this issue May 16, 2024 · 2 comments · Fixed by #4631
Assignees

Comments

@Kilerd
Copy link
Contributor

Kilerd commented May 16, 2024

openDAL 0.46 use range requests to increase performance, and it works well at standard webdav implementation. but for some non-standard impl server like 坚果云, it return unexpected result.

there are two related http code in this case: 206 Partial Content and 416 Range Not Satisfiable

given the case of 5MiB file, we send a range request of 0-4MiB,

  • standard impl return 4MiB content with 206 http code (expected)
  • 坚果云 impl return 4MiB content with 206 http code(expected)

given the case of 5MiB file, we send a range request of 4-8MiB,

  • standard impl return last 1MiB content with 206 http code (expected)
  • 坚果云 impl return empty content with 416 http code(unexpected)

given the case of 2MiB file, we send a range request of 0-4MiB,

  • standard impl return 2MiB content with 206 http code (expected)
  • 坚果云 impl return empty content with 416 http code(unexpected)

When the 416 Range Not Satisfiable error message is received, it implies the client has requested partial content, using the Content-Range header. For ranges of bytes, if the first byte of the specified range was greater than the length of the sequence, then this error message will be returned.

-- https://http.dev/416

based on the definition of 416, only the first byte of the range is greater than the length of content will raise this error.

considering the existing implementation of 坚果云, we'd better to increase our compatibility to adapt it.

P.S. it works well in openDAL 0.45.1

@Xuanwo
Copy link
Member

Xuanwo commented May 16, 2024

Thanks for the report, I think we can fix this by fetching the length first.

@Xuanwo
Copy link
Member

Xuanwo commented May 21, 2024

Hi, @Kilerd, this should be fixed in next release.

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

Successfully merging a pull request may close this issue.

2 participants