httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wichitill <ma...@gmx.de>
Subject Re: Problem use Apache::Upload
Date Sat, 31 Jul 2004 17:25:43 GMT
Randy Kobes wrote:
> Perhaps the template below would illustrate your problem? In
> here, I put in a POST_MAX of 555555, and tried uploading a
> file larger than that - this was specified by the alias
> /getfiles-binary-too_big in glue/perl/t/conf/extra.conf.in.
> I then called $req->parse(), and returned
> Apache::SERVER_ERROR unless $req->parse() was APR::SUCCESS.
> Is this more or less what's happening? You should just be
> able to change the /getfiles-binary-too_big alias in
> glue/perl/t/conf/extra.conf.in from D:/test.xml (a 10 MB
> file on my system) to whatever you want to test this; for
> me, on Win32, these tests still pass, but perhaps this isn't
> the same configuration as you?

It passes, but crashes if I move the parse() line directly under new():

>  sub handler {
>      my $r = shift;
> -    my $req = Apache::Request->new($r);
> +    my $req = Apache::Request->new($r, POST_MAX => 555555);
> +    my $status = $req->parse();
> +    return Apache::SERVER_ERROR unless ($status == APR::SUCCESS);
>      my $temp_dir = File::Spec->tmpdir;
> 
>      my $method  = $req->args('method');
>      my $has_md5  = $req->args('has_md5');
>      require Digest::MD5 if $has_md5;
>      my $upload = $req->upload(($req->upload)[0]);


> By the way, if you don't want to go through all the
> tests via 'nmake test', and just test this one, what
> you could do is install the Perl modules (so as to
> not bother with adding blib/ - this assumes your
> Win32 is just a test box), and then, within glue/perl,
>    perl t/TEST --config
> which generates the new t/conf/httpd.conf and
> t/conf/extra.conf, based on extra.conf.in), and then
>    perl t/TEST -v apreq/upload
> to run just the upload tests.
> 

I use "perl t/TEST -verbose t/apreq/upload.t" without any manual --config or 
blib-adding, that seems to be included in TEST.

Mime
View raw message