Ticket #2147 (closed defect: fixed)
Very slow on /?pf=* pages if compression enabled
Reported by: | RaphAstronome | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 2.9 |
Component: | module:core | Version: | 2.8.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi,
I have performance trouble on a OVH shared server. Files like /index.php?pf=lightbox/js/modal.js is very slow. The connexion and response is ok but after the connexion don't close and the browser wait for timeout adding huge latency to load the entire page.
After some tests I disabled the "header('Content-Length: '.filesize($PF));" line in inc/load_plugin_file.php and without any hint of length the browser closes the connexion properly.
I suppose it is due to an incompatibility between the hosting who compress the response using gzip and the length value given by Content-Length calculated with full file size and not compressed size.
The message I have sent on OVH's forum (in french) : https://forum.ovh.com/showthread.php/107221-Lenteurs-dotclear2-pour-les-requ%C3%AAtes-pf-*
Is it possible to compute correct value or remove it if compression is detected ? (generally it is tiny files Content-Length is not so important)
Thanks
Change History
comment:2 Changed 10 years ago by franck <carnet.franck.paul@…>
- Status changed from new to closed
- Resolution set to fixed
(In [4e0ecb714e74]) Fix #2147, content-length header is not more given
comment:4 Changed 10 years ago by franck
Meanwhile you can add a directive in your .htaccess file (rather than comment the corresponding line) until we release the 2.9 version of Dotclear :
Header unset Content-Length
See: https://httpd.apache.org/docs/2.4/mod/mod_headers.html#header
I think that we have two ways to fix this :
I propose to apply the second way and test it a bit
Any comment?