Permalink
Browse files

return 404 if content is null

  • Loading branch information...
yusukebe committed Sep 17, 2009
1 parent a44e721 commit 445f2b3a1a5bb4483124ade2e61855b3dfe48ea3
Showing with 6 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +5 −1 lib/Noe.pm
View
@@ -10,3 +10,4 @@ tmon.out
cover_db_view
nytprof
.DS_Store
+eg/YouTubeMP4
View
@@ -67,7 +67,11 @@ sub psgi_handler {
use warnings;
$controller->require;
my $method = $rule->{action} or return $self->handle_404;
- return $controller->$method($context);
+ if( my $code = $controller->$method($context) ){
+ return $code;
+ }else{
+ return $self->handle_404;
+ }
}
}

0 comments on commit 445f2b3

Please sign in to comment.