I apologize if this has been covered, but I wasn't able to locate anything
explicit in the archives pertaining to my situation.

I'm using Apache::Request 1.31 to handle file uploads, which work just fine.

I can upload all day.

I'm also using the apr->parse method to grab status on the upload candidate
to determine if the file size is greater than POST_MAX. This works fine--
libapreq knows that the file is too large and reports it via apr->notes.

However, when using the result of apr->parse as a conditional to determine
if I should let the file be uploaded, I run into a snag:

An example snippet:

        my $status=$apr->parse;
        $r->log_reason("Status is: " . $arp->notes('error-notes'));
        if ($status) {
                $r->send_http_header;
                $r->print("File upload error");
                return OK;
        }

I expect this to immediately return to the client the error message and
close the connection. Is that the wrong expectation?

What really happens is the logging occurs and then the client uploads the
file before the message is displayed.

Am I missing something? Or is there another method to trap the conditions I
want to impose on a file upload?

The problem happens in the following environment, everything compiled from
source:

        Apache 1.3.12
        mod_perl 1.24
        libapreq 1.31 w/ and w/o patch from [EMAIL PROTECTED] 6/30/2000
        Linux 2.2.16
        Perl 5.005_03

I would use CGI for the uploading as recommended in the guide, but my
handler is doing much more than just uploading, including custom auth.

Any assistance would be appreciated.

-- 
David S. Kenzik
[EMAIL PROTECTED] - http://kenzik.com
Original Music - http://mp3.com/text

Reply via email to