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

Return total file size for Content-Range instead of * #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bredar
Copy link

@bredar bredar commented Nov 7, 2023

If the client loads a file range using the range header, webdav-server returns correct data with the Content-Range response header.

Before:
Content-Range: 0-1024/*

The asterisk (*) is allowed according to http specs instead of returning the total file size. But some clients (like the pdftools.com PDF Web Viewer) require the real file size to work. This pr changes the behavior to return the file size like:

Now:
Content-Range: 0-1024/4000

I've also needed to change some stuff for TypeScript to work.

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 this pull request may close these issues.

1 participant