Remove status description from Session/Http, and update all users of setStatus.

This commit is contained in:
Colin Kuskie 2010-06-17 08:18:24 -07:00
parent 4cf75513d3
commit 19c2c5fa1c
16 changed files with 50 additions and 85 deletions

View file

@ -96,7 +96,7 @@ sub handler {
if ($var->get("userId") eq "1"
&& defined $asset
&& !$http->ifModifiedSince($asset->getContentLastModified, $session->setting->get('maxCacheTimeout'))) {
$http->setStatus("304","Content Not Modified");
$http->setStatus(304);
$http->sendHeader;
return "chunked";
}

View file

@ -46,7 +46,7 @@ The content handler for this package.
sub handler {
my ($session) = @_;
$session->http->setStatus("404","Page Not Found");
$session->http->setStatus(404);
my $output = "";
my $notFound = WebGUI::Asset->getNotFound($session);
if (defined $notFound) {

View file

@ -47,7 +47,7 @@ The content handler for this package.
sub handler {
my ($session) = @_;
if ($session->env->get("HTTP_X_MOZ") eq "prefetch") { # browser prefetch is a bad thing
$session->http->setStatus("403","We don't allow prefetch, because it increases bandwidth, hurts stats, and can break web sites.");
$session->http->setStatus(403);
}
return undef;
}