Do not generate the Not Found page if JS or CSS was requested. Cut #1
This commit is contained in:
parent
4649297b9f
commit
df56936e59
1 changed files with 6 additions and 0 deletions
|
|
@ -48,6 +48,12 @@ sub handler {
|
|||
my ($session) = @_;
|
||||
$session->http->setStatus("404","Page Not Found");
|
||||
my $output = "";
|
||||
my $requestedUrl = $session->url->getRequestedUrl;
|
||||
##If they requested some snippet that doesn't exist any longer, then just
|
||||
##return an empty string instead of generating the whole not found page.
|
||||
if ($requestedUrl =~ /\.(?:js|css)$/) {
|
||||
return '';
|
||||
}
|
||||
my $notFound = WebGUI::Asset->getNotFound($session);
|
||||
if (defined $notFound) {
|
||||
$session->asset($notFound);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue