in reply to Is libapreq2 dead?

It has a mailing list and is alive and well. What isn't working for you about large uploads? Have you asked about it on the list?

Replies are listed 'Best First'.
Re^2: Is libapreq2 dead?
by jdrago_999 (Hermit) on Oct 29, 2008 at 20:32 UTC
    Hi -

    I've done several Google searches (which include the mailing list archives) and have come up with this gem: "Re: MP2 Apache2::Request trouble with POST_MAX" Quote:
    Garrison Hoffman wrote:
    > I've tried numerous variations, but can't get POST_MAX to work properly.
    > Everything works fine without it.
    >
    > my $POST_MAX = 1024*1024*10;
    > my $req = Apache2::Request->new($r, POST_MAX => $POST_MAX); >
    > The error log tells me only "Conflicting information", which seems
    > exceedingly unhelpful.
    >
    > Can someone point me in the right direction?

    http://libapreq2.p6m7g8.net/apreq_8h.html#a4
    You might try the httpd.conf configuration directives if you want it for _ALL_ $req objects.

    #define APREQ_DEFAULT_READ_LIMIT (64 * 1024 * 1024) is the default.

    APREQ2_ReadLimit 10485760

    See glue/perl/t/response/TestApReq/request.pm for an example of using the POST_MAX argument.

    The test that the above post refers to (request.pm) contains the following code:
    sub handler { my $r = shift; my $temp_dir = File::Spec->catfile(Apache2::ServerUtil::server_root, 'logs'); my $req = Apache2::Request->new($r, POST_MAX => 1_000_000, TEMP_DIR => $temp_dir);
    Adjusting that 1_000_000 to anything larger than the *hard coded* default in include/apreq.h.

    I've tried seemingly everything (APREQ2_ReadLimit) and have got nowhere.

    I still get the dreaded Content-Length header (1478240097) exceeds configured max_body limit (67108864). Yes I know that's a big file. It happens to be the size of the Wikipedia English snapshot, compressed.

    The word on the street is that setting the read limit very high opens you up to DoS attacks. Makes sense, but I'd still like to know how to move > 1Gb files onto the server, and make it easy for my users.
      You really need to ask on the mailing list. I'm not a libapreq2 developer.