From 2b15d4886a3e65031c2ccd4c53d33c237a58da3d Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 2 Oct 2006 07:39:58 +0000 Subject: [PATCH] updating the proxy git-svn-id: svn://svn.open-ils.org/ILS/trunk@6341 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Reporter/Proxy.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Reporter/Proxy.pm b/Open-ILS/src/perlmods/OpenILS/Reporter/Proxy.pm index 7ab997504d..9d1c97ef88 100644 --- a/Open-ILS/src/perlmods/OpenILS/Reporter/Proxy.pm +++ b/Open-ILS/src/perlmods/OpenILS/Reporter/Proxy.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Apache2 (); use Apache2::Log; -use Apache2::Const -compile => qw(OK NOT_FOUND DECLINED :log); +use Apache2::Const -compile => qw(REDIRECT FORBIDDEN OK NOT_FOUND DECLINED :log); use APR::Const -compile => qw(:error SUCCESS); use CGI; use Data::Dumper; @@ -43,21 +43,20 @@ sub handler { if ($url =~ /^http:/o) { $url =~ s/^http:/https:/o; print "Location: $url\n\n"; - return 200; + return Apache2::Const::OK; } + print $cgi->header(-type=>'text/html', -expires=>'-1d'); print <<" HTML"; -Content-type: text/html - Report Output Login
- +
- + @@ -73,7 +72,7 @@ Content-type: text/html HTML - return 200; + return Apache2::Const::OK; } $auth_ses = oils_login($u, $p); @@ -86,19 +85,19 @@ Content-type: text/html -path=>'/',-expires=>'+1h' ) ); - return 302; + return Apache2::Const::REDIRECT; } } my $user = verify_login($auth_ses); - return Apache2::Const::NOT_FOUND unless ($user); + return Apache2::Const::FORBIDDEN unless ($user); my $failures = OpenSRF::AppSession ->create('open-ils.actor') ->request('open-ils.actor.user.perm.check', $auth_ses, $user->id, $ws_ou, ['RUN_REPORTS']) ->gather(1); - return Apache2::Const::NOT_FOUND if (@$failures > 0); + return Apache2::Const::FORBIDDEN if (@$failures > 0); # they're good, let 'em through return Apache2::Const::DECLINED if (-e $apache->filename); -- 2.11.0
Please log in to view reportsPlease log in to view reports
Username or barcode: