If your post data is multipart/form-data or application/x-www-form-urlencoded, consider using libapreq (http://httpd.apache.org/apreq/) which will do the heavy lifting for you quite nicely...
Issac Thib wrote: > 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); > } >