diff options
Diffstat (limited to 'Xerl/Main/Global.pm')
| -rw-r--r-- | Xerl/Main/Global.pm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Xerl/Main/Global.pm b/Xerl/Main/Global.pm index 5ed8567..291eca7 100644 --- a/Xerl/Main/Global.pm +++ b/Xerl/Main/Global.pm @@ -45,8 +45,23 @@ sub PLAIN { sub REDIRECT ($) { my $location = shift; + say "Status: 301 Moved Permanantly"; print "Location: $location\n\n"; + + return undef; +} + +sub HTTP { + my $descr = _HTTP_DESCR(shift); + + print $descr; + local $, = ' '; + print $descr; + + Xerl::Main::Global::SHUTDOWN(); + + # Never reach this point return undef; } @@ -55,6 +70,7 @@ sub _HTTP_DESCR ($;$) { $infomsg //= ''; + # Sub returns one of the strings below if ( $status == 404 ) { "Status: 404 Not Found $infomsg\015\012\n\n" @@ -64,16 +80,4 @@ sub _HTTP_DESCR ($;$) { } } -sub HTTP { - my $descr = _HTTP_DESCR(shift); - print $descr; - local $, = ' '; - print $descr; - - Xerl::Main::Global::SHUTDOWN(); - - # Never reach this point - return undef; -} - 1; |
