From: "Moacir Schmidt" [EMAIL PROTECTED]

> Does anyone have an example of module to handle a mutipart/form-data
> submission that works with apache 2.2?


I am not sure what type of "handling" you are looking for.  However, here is 
the block my module uses to pass the request content.  It adequately passes 
large POST content as well as multipart/form-data.

if (ap_should_client_block(r)) {
    apr_size_t rsize, len_read, rpos=0, length = r->remaining;

    while ((len_read = ap_get_client_block(r, buf, AP_IOBUFSIZE)) > 0) {
        if ((rpos + len_read) > length ) {
            rsize = length - rpos;
        }
        else {
            rsize = len_read;
        }
        if ( (status = my_socket_send(r, sock, buf, &rsize))!=OK ) return 
status;
        rpos += rsize;
    }
}

HTH

Chris Kukuchka
Sequoia Group, Inc.


Reply via email to