Problem setting POST_MAX
am 17.09.2008 10:37:07 von Rolf Schaufelberger
Hi,
when I try to set POST_MAX to a higher value I get
Conflicting information.
I've a mod_perl / Mason app with an own hander, starting with
(mod_perl2)
sub handler () :method {
my $class = shift;
my $r = shift;
my ($app, $return);
my $args = $ah->request_args( Apache2::Request->new($r),
POST_MAX => 200 <<20);
....
}
I've also tried to set it via read_limit() with the same result.
What's wrong ?
rolf
Re: Problem setting POST_MAX
am 17.09.2008 10:46:40 von Ryan Gies
On Wed, 17 Sep 2008 10:37:07 +0200
Rolf wrote:
> when I try to set POST_MAX to a higher value I get
>
> Conflicting information.
>
> I've also tried to set it via read_limit() with the same result.
> What's wrong ?
The best explanation I've found is Philip's:
http://www.mail-archive.com/apreq-dev@httpd.apache.org/msg00 716.html
Basically you can lower the limit, but not raise it above the default
or that which is specified by APREQ2_ReadLimit (scope is directory) in
the Apache config.
Re: Problem setting POST_MAX
am 17.09.2008 12:07:24 von Rolf Schaufelberger
Am Mittwoch, 17. September 2008 10:46:40 schrieb Ryan Gies:
> On Wed, 17 Sep 2008 10:37:07 +0200
>
> Rolf wrote:
> > when I try to set POST_MAX to a higher value I get
> >
> > Conflicting information.
> >
> > I've also tried to set it via read_limit() with the same result.
> > What's wrong ?
>
> The best explanation I've found is Philip's:
>
> http://www.mail-archive.com/apreq-dev@httpd.apache.org/msg00 716.html
>
> Basically you can lower the limit, but not raise it above the default
> or that which is specified by APREQ2_ReadLimit (scope is directory) in
> the Apache config.
So I have to change this in the source to get a vlaue above 64M? :-(
rolf
Re: Problem setting POST_MAX
am 17.09.2008 16:09:09 von Lee Carmichael
--0-357717594-1221660549=:79348
Content-Type: text/plain; charset=us-ascii
Hello Rolf,
I think your code below might have a slight bug, I think you need to have have the POST_MAX as a parameter to the 'new'.
e.g.
$ah->request_args( Apache2::Request->new( $r, POST_MAX => ( 200 << 20 ) ) );
Instead of the call below:
$ah->request_args( Apache2::Request->new($r), POST_MAX => 200 <<20);
Here is the link to the documentation:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__x s__request.html#new
HTH,
Lee
----- Original Message ----
From: Rolf Schaufelberger
To: modperl@perl.apache.org
Sent: Wednesday, September 17, 2008 3:37:07 AM
Subject: Problem setting POST_MAX
Hi,
when I try to set POST_MAX to a higher value I get
Conflicting information.
I've a mod_perl / Mason app with an own hander, starting with
(mod_perl2)
sub handler () :method {
my $class = shift;
my $r = shift;
my ($app, $return);
my $args = $ah->request_args( Apache2::Request->new($r),
POST_MAX => 200 <<20);
....
}
I've also tried to set it via read_limit() with the same result.
What's wrong ?
rolf
--0-357717594-1221660549=:79348
Content-Type: text/html; charset=us-ascii
Hello Rolf,
I think your code below might have a slight bug, I think you need to have have the POST_MAX as a parameter to the 'new'.
e.g.
$ah->request_args( Apache2::Request->new( $r, POST_MAX => ( 200 << 20 ) ) );
Instead of the call below:
$ah->request_args( Apache2::Request->new($r), POST_MAX => 200 <<20);
Here is the link to the documentation:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__x s__request.html#new
HTH,
Lee
----- Original Message ----
From: Rolf Schaufelberger <rs@plusw.de>
To: modperl@perl.apache.org
Sent:
Wednesday, September 17, 2008 3:37:07 AM
Subject: Problem setting POST_MAX
Hi,
when I try to set POST_MAX to a higher value I get
Conflicting information.
I've a mod_perl / Mason app with an own hander, starting with
(mod_perl2)
sub handler () :method {
my $class = shift;
my $r = shift;
my ($app, $return);
my $args = $ah->request_args( Apache2::Request->new($r),
POST_MAX => 200 <<20);
....
}
I've also tried to set it via read_limit() with the same result.
What's wrong ?
rolf
--0-357717594-1221660549=:79348--
Re: Problem setting POST_MAX
am 17.09.2008 17:11:30 von Rolf Schaufelberger
Hi Lee,=20
> Hello Rolf,
>
> I think your code below might have a slight bug, I think you need to have
> have the POST_MAX as a parameter to the 'new'.
>
> e.g.
>
> $ah->request_args( Apache2::Request->new( $r, POST_MAX =3D> ( 200 << 20 )=
)
> );
>
> Instead of the call below:
>
> $ah->request_args( Apache2::Request->new($r), POST_MAX =3D> 200 <<20);
>
yes, typo, however the result is the same :=20
Wed Sep 17 17:06:59 2008] [error] [client 127.0.0.1] Conflicting information
So, it really looks like I can only define a limit lower than 64M, but not=
=20
set it to a higher value.=20
> Here is the link to the documentation:
>
> http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__x s__request.ht=
ml
>#new
>
> HTH,
>
> Lee
>
>
>
> ----- Original Message ----
> From: Rolf Schaufelberger
> To: modperl@perl.apache.org
> Sent: Wednesday, September 17, 2008 3:37:07 AM
> Subject: Problem setting POST_MAX
>
> Hi,
>
> when I try to set POST_MAX to a higher value I get
>
> Conflicting information.
>
> I've a mod_perl / Mason app with an own hander, starting with
> (mod_perl2)
>
> sub handler () :method {
> my $class =3D shift;
> my $r =3D shift;
> my ($app, $return);
>
> my $args =3D $ah->request_args( Apache2::Request->new($r),
> POST_MAX =3D> 200 <<20);
> ....
> }
>
> I've also tried to set it via read_limit() with the same result.
> What's wrong ?
>
> rolf
=2D-=20
Mit freundlichen Grüßen
Rolf Schaufelberger
plusW GmbH
Stutgarter Str. 26 Tel. 49 7183 30 21 36
73635 Rudersberg Fax. 49 7183 30 21 85
www.plusw.de
www.mypixler.com
www.imagewriter.de
www.calendrino.de
Re: Problem setting POST_MAX
am 17.09.2008 20:00:24 von Ryan Gies
On Wed, 17 Sep 2008 12:07:24 +0200
Rolf wrote:
> So I have to change this in the source to get a vlaue above 64M? :-(
According to the documentation you can specify the limit in the Apache
configuration, i.e.,
APREQ2_ReadLimit 100M
I have not had success setting this directive. Nor does this work:
$r->add_config(['APREQ2_ReadLimit 100M']);
in a PerlHeaderParserHandler. If you do have success, please let me
know ;)
----
The Apache2::Request constructor attributes POST_MAX, MAX_BODY, and
READ_LIMIT are all passed to the same libapreq2 method,
apache2_read_limit_set, which, as of version 2.08, has this logic:
if (ctx->read_limit > bytes && ctx->bytes_read < bytes) {
ctx->read_limit = bytes;
return APR_SUCCESS;
}
return APREQ_ERROR_MISMATCH;
Where bytes is the value you specified with POST_MAX and
APREQ_ERROR_MISMATCH is "Conflicting information".