Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Problem setting POST_MAX

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


rs at plusw

Sep 17, 2008, 1:37 AM

Post #1 of 6 (520 views)
Permalink
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


ryan at livesite

Sep 17, 2008, 1:46 AM

Post #2 of 6 (491 views)
Permalink
Re: Problem setting POST_MAX [In reply to]

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[at]httpd.apache.org/msg00716.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.


rs at plusw

Sep 17, 2008, 3:07 AM

Post #3 of 6 (494 views)
Permalink
Re: Problem setting POST_MAX [In reply to]

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[at]httpd.apache.org/msg00716.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


lecar_red at yahoo

Sep 17, 2008, 7:09 AM

Post #4 of 6 (486 views)
Permalink
Re: Problem setting POST_MAX [In reply to]

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__xs__request.html#new

HTH,

Lee



----- Original Message ----
From: Rolf Schaufelberger <rs[at]plusw.de>
To: modperl[at]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


rs at plusw

Sep 17, 2008, 8:11 AM

Post #5 of 6 (484 views)
Permalink
Re: Problem setting POST_MAX [In reply to]

Hi Lee,

> 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);
>

yes, typo, however the result is the same :

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
set it to a higher value.

> Here is the link to the documentation:
>
> http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__request.html
>#new
>
> HTH,
>
> Lee
>
>
>
> ----- Original Message ----
> From: Rolf Schaufelberger <rs[at]plusw.de>
> To: modperl[at]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



--
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


ryan at livesite

Sep 17, 2008, 11:00 AM

Post #6 of 6 (481 views)
Permalink
Re: Problem setting POST_MAX [In reply to]

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".

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.