]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Allow file uploads via POST (from Windows XP's file uploading wizard; the client
[pr0n] / perl / Sesse / pr0n / Common.pm
index 91b4f48b683340bfc3a8443723989b817911e811..2079d6aad69c182bb26c392dec7feaf32f2ed916 100644 (file)
@@ -11,6 +11,8 @@ use Apache2::Const -compile => ':common';
 use Apache2::Log;
 use ModPerl::Util;
 
+use Carp;
+use Encode;
 use DBI;
 use DBD::Pg;
 use Image::Magick;
@@ -31,7 +33,7 @@ BEGIN {
                require Sesse::pr0n::Config_local;
        };
 
-       $VERSION     = "v2.11";
+       $VERSION     = "v2.12";
        @ISA         = qw(Exporter);
        @EXPORT      = qw(&error &dberror);
        %EXPORT_TAGS = qw();
@@ -67,6 +69,7 @@ sub error {
         footer($r);
 
        $r->log->error($err);
+       $r->log->error("Stack trace follows: " . Carp::longmess());
 
        ModPerl::Util::exit();
 }
@@ -126,7 +129,7 @@ sub get_query_string {
                next unless defined($value);
                next if (defined($defparam->{$key}) && $value == $defparam->{$key});
        
-               $str .= ($first) ? "?" : '&';
+               $str .= ($first) ? "?" : ';';
                $str .= "$key=$value";
                $first = 0;
        }