Closed (won't fix)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2007 at 15:42 UTC
Updated:
23 Jan 2008 at 10:24 UTC
Running Drupal on our webserver, passing the Content-Length header causes different, but always annoying issues on different browsers when downloading a file:
I don't know what the exact cause for those problems is, as I verified that the transmitted content-length exactly matches the file's byte size.
Given that those problems don't appear when Content-Length is omitted, and other prominent modules like user and image don't pass the Content-Length header and it still works perfectly without it, I think it would be appropriate to get rid of this header. If it brings more problems than benefits, I vote for scrapping it. Patch is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| filefield-scrap-content-length.patch | 702 bytes | jpetso |
Comments
Comment #1
jpetso commentedIt seems that the cause of this problem is the web server when it is configured to compress transferred files. Quote from mod_deflate.
So specifying the byte count of the file breaks downloads when mod_deflate or other compression mechanisms are enabled.
Comment #2
fagoI did some more investigation for this topic.
Regarding the quoted mod_deflate issue: I think this is just a note for developers evaluating the body theirself. If mod_deflate would produce crap with a Content-Length header set, this would make a lot of more trouble as both are quite common. Perhaps, someone with a running mod_deflate can verify that there are no problems.
I've tested sending content-length headers with php zlib output compression enabled - it's working.
Furthermore content-length header are needed for a progress bar, when people are downloading files. Then http://www.mnot.net/cache_docs/ suggests to do so:
However this is more an issues for images than files I think. Anyway, I think Content-Length headers are valuable and we should keep them. If there are issues with them, we better fix them :)
Comment #3
dopry commentedIs this content-length header still causing problems?
Comment #4
jpetso commentedNo, doesn't cause problems. I was keeping the issue open because I wanted to make sure Content-Length is (back) in all of filefield, imagefield and imagecache... which is the case now, so let's close and forget this issue.