fixed: there was a wrong template used for 404 header
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@553 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -408,7 +408,6 @@ void Request::SendHeaders(bool compressing, Header header)
|
||||
{
|
||||
FCGX_PutS("Status: 301 Moved Permanently\r\n", out);
|
||||
FCGX_FPrintF(out, "Location: %s\r\n", redirect_to.c_str());
|
||||
|
||||
log << log2 << "Redirect to: " << redirect_to << logend;
|
||||
}
|
||||
else
|
||||
@@ -418,11 +417,13 @@ void Request::SendHeaders(bool compressing, Header header)
|
||||
case h_404:
|
||||
FCGX_PutS("Status: 404 Not Found\r\n", out);
|
||||
FCGX_PutS("Content-Type: Text/Html\r\n", out);
|
||||
log << log2 << "Request: response: 404 Not Found" << logend;
|
||||
break;
|
||||
|
||||
case h_403:
|
||||
FCGX_PutS("Status: 403 Forbidden\r\n", out);
|
||||
FCGX_PutS("Content-Type: Text/Html\r\n", out);
|
||||
log << log2 << "Request: response: 403 Forbidden" << logend;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -482,10 +483,12 @@ void Request::SendPage(bool compressing, const std::string & source_ref)
|
||||
|
||||
void Request::SendAll()
|
||||
{
|
||||
const std::string & source_ref = page.str();
|
||||
bool compressing = data.compression && !browser_msie && !browser_konqueror &&
|
||||
accept_encoding_parser.AcceptDeflate() && source_ref.size() >= 512;
|
||||
const std::string & source = page.str();
|
||||
Header header = h_200;
|
||||
bool compressing = data.compression && role == responder &&
|
||||
!browser_msie && !browser_konqueror &&
|
||||
accept_encoding_parser.AcceptDeflate() && source.size() >= 512;
|
||||
|
||||
|
||||
if( status == Error::no_item || status == Error::no_function || status == Error::unknown_param )
|
||||
header = h_404;
|
||||
@@ -508,7 +511,7 @@ Header header = h_200;
|
||||
AddDebugInfo();
|
||||
|
||||
// sending content
|
||||
SendPage(compressing, source_ref);
|
||||
SendPage(compressing, source);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user