-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Honor Accept
header when downloading directories
#41037
Comments
Yes. server/lib/private/Streamer.php Lines 43 to 44 in 5c2610a
|
You could always specify the User-Agent too. ;-) Joking aside, unfortunately even User-Agent wouldn't be sufficient as archive size is also a factor: server/lib/private/Streamer.php Lines 84 to 90 in 1de151a
Outside of possible quirks in the zip stream library we use (and maybe 32-bit support?), I wonder if there's still a need for different cross-platform archive handling? |
I believe this was implemented because TAR is native on MacOS, and has (had?) some problems with Zip64 files. |
Fixed by #48098 |
How to use GitHub
Is your feature request related to a problem? Please describe.
The file format one gets when downloading a directory seems to depend on the HTTP
User-Agent
and does not honor theAccept
header.macos user agents seem to get
tar
files, while everyone else getszip
files.This makes it hard to write instructions to e.g. download files and unpack them via the command line (e.g. curl / wget) that are valid cross platform.
Describe the solution you'd like
It would be great if Nextcloud would honor the
Accept
header when downloading a directory, so that e.g. it is guaranteed that:always produces a tar file and a zip file respectively, independent of platform / user agent.
Describe alternatives you've considered
A possible alternative would be a query parameter for the filetype.
The text was updated successfully, but these errors were encountered: