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

ctx.estimatedSize provided to _openWriteStream is incorrect on Mac OS #108

Open
qali-clio opened this issue Nov 16, 2021 · 0 comments
Open

Comments

@qali-clio
Copy link

When implementing a custom FileSystem (as per https://github.com/OpenMarshal/npm-WebDAV-Server/wiki/Custom-File-System-%5Bv2%5D), _openWriteStream receives an OpenWriteStreamInfo that contains the size of the incoming file. On Mac OS, the size in this parameter is -1 because Finder does not provide a Content-Length header.

Instead, servers interacting with Finder should use the length from the X-Expected-Entity-Length header. Extracting the estimated size from the X-Expected-Entity-Length header with a fallback to Content-Length works on both Mac and Windows.

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