X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason%2FRequest.pm;h=99a8daa60dbc986fda3edd23db279d9b97a636a8;hb=121510b6337b7f75f25d583730a65f3fc63bbfbe;hp=b33efcc1783a9db26657cef933767063766f81e8;hpb=b36fd164c990208bb1c37f40ee1887996442f94e;p=freeside.git diff --git a/FS/FS/Mason/Request.pm b/FS/FS/Mason/Request.pm index b33efcc17..99a8daa60 100644 --- a/FS/FS/Mason/Request.pm +++ b/FS/FS/Mason/Request.pm @@ -4,8 +4,8 @@ use strict; use warnings; use vars qw( $FSURL $QUERY_STRING ); use base 'HTML::Mason::Request'; +use IO::Handle; use FS::Trace; -use FS::access_user_log; $FSURL = 'http://Set/FS_Mason_Request_FSURL/in_standalone_mode/'; $QUERY_STRING = ''; @@ -46,12 +46,11 @@ my $protect_fds; sub freeside_setup { my( $class, $filename, $mode ) = @_; - FS::Trace->log(' protecting fds'); - #from rt/bin/webmux.pl(.in) if ( !$protect_fds && $ENV{'MOD_PERL'} && exists $ENV{'MOD_PERL_API_VERSION'} && $ENV{'MOD_PERL_API_VERSION'} >= 2 ) { + FS::Trace->log(' protecting fds'); # under mod_perl2, STDIN and STDOUT get closed and re-opened, # however they are not on FD 0 and 1. In this case, the next # socket that gets opened will occupy one of these FDs, and make @@ -65,9 +64,11 @@ sub freeside_setup { if fileno(STDOUT) != 1; } - FS::Trace->log(' adding headers'); - #frame-ancestors not supported by all the major browsers yet - $HTML::Mason::Commands::r->header_out( 'X-Frame-Options', 'SAMEORIGIN' ); + if ( $HTML::Mason::Commands::r ) { + FS::Trace->log(' adding headers'); + #frame-ancestors not supported by all the major browsers yet + $HTML::Mason::Commands::r->header_out( 'X-Frame-Options', 'SAMEORIGIN' ); + } if ( $filename =~ qr(/REST/\d+\.\d+/NoAuth/) ) { @@ -128,8 +129,6 @@ sub freeside_setup { } - FS::access_user_log->insert_new_path( $filename ); - FS::Trace->log(' done'); }