Index: modules/stream/handler.pl =================================================================== --- modules/stream/handler.pl (revision 15496) +++ modules/stream/handler.pl (working copy) @@ -62,6 +62,7 @@ unless ($basename =~ /\w/) { print header(), "Unknown recording requested.\n"; + goto ALLDONE; CORE::exit; } @@ -80,6 +81,7 @@ unless ($filename) { print header(), "$basename does not exist in any recognized storage group directories for this host."; + goto ALLDONE; CORE::exit; } @@ -129,6 +131,7 @@ -Content_disposition => " attachment; filename=\"$title-$subtitle.asx\"", ), $file; + goto ALLDONE; CORE::exit; } @@ -153,7 +156,9 @@ type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=$uri&autoStart=true" /> + EOF + goto ALLDONE; CORE::exit; } elsif ($ENV{'REQUEST_URI'} =~ /\.flv$/i) { @@ -170,6 +175,7 @@ print $buffer; } close DATA; + goto ALLDONE; CORE::exit; } @@ -180,6 +186,7 @@ if ($size < 1) { print header(), "$basename is an empty file."; + goto ALLDONE; CORE::exit; } @@ -197,6 +204,7 @@ else { print header(), "Unknown video type requested: $basename\n"; + goto ALLDONE; CORE::exit; } @@ -214,6 +222,7 @@ unless (sysopen DATA, $filename, O_RDONLY) { print header(), "Can't read $basname: $!"; + goto ALLDONE; CORE::exit; } @@ -253,5 +262,6 @@ close DATA; # Return true + ALLDONE: 1; Index: mythweb.pl =================================================================== --- mythweb.pl (revision 15496) +++ mythweb.pl (working copy) @@ -49,6 +49,7 @@ unless ($dbh) { print header(), "Cannot connect to database: $!\n\n"; + goto THEEND; exit; } @@ -59,7 +60,19 @@ if ($Path[0]) { if (-e "$modules_dir/$Path[0]") { if (-e "$modules_dir/$Path[0]/handler.pl") { - require "modules/$Path[0]/handler.pl"; + #require "modules/$Path[0]/handler.pl"; + # "require" only gets loaded once per run; + # mod_perl can reuse the same interpreter and so + # this line may have no effect after the first + # run + + if ($handlescript eq "") { + $handlescript=`cat modules/$Path[0]/handler.pl`; + } + eval $handlescript; + goto THEEND; + #exit + } else { print header(), @@ -77,6 +90,7 @@ } # Exit nicely + goto THEEND; exit; ################################################################################ @@ -94,3 +108,4 @@ return undef; } +THEEND: ftrias@tserv1:~/downloads/source/mythplugins/mythweb$