-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add a server side check for mod_deflate to prevent corrupted files #4783
Comments
That's a good idea. Can you open a pull request. The check shoud go into lib/util.php like the other checks. Very straight forward. |
I check can be done like that: http://stackoverflow.com/questions/1862641/compressing-content-with-php-ob-start-vs-apache-deflate-gzip But I'm unsure if this is still needed. Wasn't the original problem that WebDAV breaks if mod_deflate and ob_start('gz_handler') is both used. So that the output is compressed two times? Nowadays we no longer do compression with php so mod_deflate should be ok. On my test machine mod_deflate is activated and seems to work fine. @danimo What do you think? |
👍 Please add a check and warning message when deflate is on. I had some tar.gz files which were just a few bytes missing at the begin of the file, cost me hours to find out why. |
What's about adding |
@karlitschek I can confirm this 100%(!). I double checked it with Safari, Firefox, If I use
Verified also with
As mentioned above, a fix is Also downloading the file from my local network is more than two times faster without gzip. |
Here's a patch which looks good to me: zuazo/owncloud-cookbook@adce32a |
@LukasReschke Is this possible with our current config check in core? |
@MorrisJobke The check itself could be added for apache mod-php5 like this: Unfortunately this won't work on php-cgi/php-fpm An alternative approach was posted by @schmunk42 above: #4783 (comment) |
So did some tests on a Apache instance. It seems that mod_deflate is changing the ETag and appending an -gzip to it:
I don't know if this is a configuration problem on my side but a test.txt file is not shipped compressed/gzipped:
|
I should be able to add a check for that on the browser-side. Let me look into that. |
Ref for the doc part: owncloud-archive/documentation#992 |
Hi,
as reported in:
owncloud/client#965
it seems that files are corrupted in the sync client when mod_deflate is enabled at the webserver. Adding a server side check for this could prevent such issues.
The text was updated successfully, but these errors were encountered: