added: exception for the Konqueror browser

it has a problem with deflate compression


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@539 e52654a7-88a9-db11-a3e9-0013d4bc506e
pull/3/head
Tomasz Sowa 13 years ago
parent ce7ae3edd4
commit 118bf1fc65

@ -252,6 +252,16 @@ void Request::CheckIE()
browser_msie = false;
}
void Request::CheckKonqueror()
{
char * kon = strstr(env_http_user_agent, "Konqueror");
if( kon )
browser_konqueror = true;
else
browser_konqueror = false;
}
void Request::CheckMethod()
@ -313,6 +323,7 @@ void Request::Read()
CheckMethod();
ReadParameters();
CheckIE();
CheckKonqueror();
}
@ -403,7 +414,7 @@ void Request::SendPage(bool compressing)
void Request::SendAll()
{
bool compressing = data.compression && !browser_msie && accept_encoding_parser.AcceptDeflate();
bool compressing = data.compression && !browser_msie && !browser_konqueror && accept_encoding_parser.AcceptDeflate();
SendSessionCookie();
SendHeaders(compressing);

@ -67,6 +67,9 @@ struct Request
// true if the browser is Microsoft Internet Explorer
bool browser_msie;
// true if the browser is Konqueror
bool browser_konqueror;
// current session
// is set after calling session_manager.SetSession()
Session * session;
@ -151,6 +154,7 @@ private:
void SendSessionCookie();
void CheckIE();
void CheckKonqueror();
void SendHeaders(bool compressing);
void AddDebugInfo();

Loading…
Cancel
Save