content_length

How do I get the content length of the request body? or the equivalent =
of $ENV{'CONTENT_LENGTH'} ?

my $current_read =3D $r->read($current_buffer, $current_length - =
$current_remaining, $current_remaining);

Thanks!=
Ryan Perry [ Di, 24 November 2009 22:25 ] [ ID #2023863 ]

Re: content_length

Ryan Perry wrote:
> How do I get the content length of the request body? or the equivalent of $ENV{'CONTENT_LENGTH'} ?
>
> my $current_read = $r->read($current_buffer, $current_length - $current_remaining, $current_remaining);
>
> Thanks!


Content-Length is just a header, so you get it through headers_in.

mp2:

http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html# C_headers_in_

mp1:

http://perl.apache.org/docs/1.0/api/Apache.html#_r_E_gt_head ers_in

Adam
Adam Prime [ Di, 24 November 2009 22:32 ] [ ID #2023864 ]
Webserver » gmane.comp.apache.mod-perl » content_length

Vorheriges Thema: Bug in $r->no_cache(1) with mod_expires
Nächstes Thema: Problems running mod_perl install tests - where should these be posted to