Ok, thanks for your help. As you advise me, I'm not going to use apreq... I'm will read post data with ap_get_client_block routine.
Best regards, Thibaud 2007/3/27, Issac Goldstand <[EMAIL PROTECTED]>:
You could, but you'd need to write your own parser, which I'm not sure you'd want to do... Thib wrote: > Hi, > > Thanks for your response. The post data I must read is pure xml. > If I understand well the doc of apreq, it handle data parsing > application/x-www-form-urlencoded and multipart/form-data. So with apreq, > can I read the post data ? > > Best regards, > > Thibaud > > 2007/3/27, Issac Goldstand <[EMAIL PROTECTED]>: >> >> 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); >> > } >> > >> >