httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thib <chep...@gmail.com>
Subject The best practice to definitevely read post data
Date Tue, 27 Mar 2007 06:52:30 GMT
Hi,

I'm writing a new apache module to handle post data and to generate a
response. I'm using a handler, read post data with the methods
ap_setup_client_block, ap_should_client_block and ap_get_client_block and It
works correctly

However, I ask myself about the best way to read post data ( with brigade
and buckets for example ? )

Thanks for your help.

Thibaud

PS : Here an example of how I read post data.

    ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);

    char buffer[1024];

    if ( ap_should_client_block(r) == 1 ) {
        while ( ap_get_client_block(r, buffer, 1024) > 0 ) {
             ap_rputs("Reading in buffer...<br>",r);
             ap_rputs(buffer,r);
        }
    }
    else {
        ap_rputs("Nothing to read...<br>",r);
    }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message