Remove status description from Session/Http, and update all users of setStatus.
This commit is contained in:
parent
4cf75513d3
commit
19c2c5fa1c
16 changed files with 50 additions and 85 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue