[Jifty-commit] jifty branch, master, updated. 13fdf6c6ef5e04d1a2379660f92fd7cdb0784de5
Jifty commits
jifty-commit at lists.jifty.org
Thu May 13 05:51:27 EDT 2010
The branch, master has been updated
via 13fdf6c6ef5e04d1a2379660f92fd7cdb0784de5 (commit)
from 3e54cf2a301f5dfbb8ab7e521cea3420cab785fb (commit)
Summary of changes:
lib/Jifty/Dispatcher.pm | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 13fdf6c6ef5e04d1a2379660f92fd7cdb0784de5
Author: Chia-liang Kao <clkao at clkao.org>
Date: Thu May 13 17:30:14 2010 +0800
add some content for 403 errors.
diff --git a/lib/Jifty/Dispatcher.pm b/lib/Jifty/Dispatcher.pm
index dcce8f5..5f6d1d4 100644
--- a/lib/Jifty/Dispatcher.pm
+++ b/lib/Jifty/Dispatcher.pm
@@ -777,9 +777,13 @@ Don't display any page. just stop.
sub _do_abort {
my $self = shift;
$self->log->debug("Aborting processing");
- if (@_) {
+ if (my $code = shift) {
# This is the status code
- Jifty->web->response->status( shift );
+ Jifty->web->response->status( $code );
+ if ( $code == 403 && !Jifty->web->response->body) {
+ Jifty->web->response->content_type('text/plain');
+ Jifty->web->response->body('403 Forbidden');
+ }
}
$self->_abort;
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list