Bug #3237
Compression headers in hosts/services xml and in graphs png
| Status: | Closed | Start date: | 04/13/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% | ||
| Category: | Centreon | |||
| Target version: | Centreon 2.3.9 | |||
| Resolution: | fixed |
Description
After i upgraded to 2.3.4, my web gui didn't show hosts and services list and graphs.
I tried some solutions to similar problems i found in the bugs list and forum but they didn't solve the issue.
So i had a look to the php sources and i found in these files centreonGraph.class.php and centreonXMLBGRequest.class.php this piece of code:
if (headers_sent()){
$encoding = false;
} else if (strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false){
$encoding = 'x-gzip';
} else if (strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false){
$encoding = 'gzip';
} else {
$encoding = false;
}
in both scripts that causes an Content-encoding: gzip was add in the response to the ajax calls (cause in the request headers it puts Accept-Encoding:gzip,deflate,sdch) even if the script didn't compress the body it sent.
So the javascript received data it couldn't handle (firebug said it got 0 byte data even if in apache logfile i saw the server sent a not null response) and it failed to render the web pages.
I tried to enable the zlib compression in php.in but it solved only the hosts/services issue not the graphics one.
Than i hacked the source code commenting all the if block forcing $encoding to false and that solved my gui problems. Server OS: Debian lenny
php: 5.2.6
apache: 2.2.9
Tested browsers:
- Google chrome 18.0.1025.151 on macOS X 10.7.3
- Mozilla firefox 11.0 on macOS X 10.7.3
- Internet Explorer 9 on windows server 2008 R2
History
#1
Updated by Julien Mathis about 1 year ago
- Category set to Centreon
- Assignee set to Maximilien Bersoult
- Target version set to Centreon 2.3.7
#2
Updated by Julien Mathis about 1 year ago
- Target version changed from Centreon 2.3.7 to Centreon 2.3.8
#3
Updated by Sylvestre Ho about 1 year ago
- Target version changed from Centreon 2.3.8 to Centreon 2.3.9
#4
Updated by Maximilien Bersoult 12 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Resolution set to fixed
- Fix problem with bad compress/gzip header in r13091; r13092