httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Verdelli <christian.verde...@zeropiu.it>
Subject Re: Input Filter reading Body
Date Fri, 20 Oct 2006 16:35:10 GMT
Well,
actually i took my piece of code right from that module.
I just took out the piece i needed but happen exaclty using mod_diagnostic.c
I just added the function to read data from the bucket :

apr_bucket_read(b,&data,&len,1);
  ap_log_perror(APLOG_MARK, APLOG_NOTICE, NULL, f->c->pool,
      "    %s %s:    %d bytes - data : %s", f->frec->name, t, b->length, 
data) ;

and that's the output in the log file:


[Fri Oct 20 18:32:51 2006] [notice] i-network-2: mode READBYTES; 
blocking; 17 bytes
[Fri Oct 20 18:32:51 2006] [notice] \ti-network-2 HEAP:\t17 bytes - data 
: \xa7\x0fe
[Fri Oct 20 18:32:51 2006] [error] [client 127.0.0.1] File does not 
exist: C:/Apache2/htdocs/pino
[Fri Oct 20 18:32:51 2006] [notice] i-network-2: mode EATCRLF; 
non-blocking; 0 bytes
[Fri Oct 20 18:32:51 2006] [notice] i-network-2: ap_get_brigade returned 
730035
[Fri Oct 20 18:32:51 2006] [notice] i-network-2: mode GETLINE; blocking; 
0 bytes
[Fri Oct 20 18:32:51 2006] [notice] \ti-network-2 IMMORTAL:\t0 bytes - 
data : \xa9~\xe9nt
[Fri Oct 20 18:32:51 2006] [notice] i-network-2: mode GETLINE; blocking; 
0 bytes
[Fri Oct 20 18:32:51 2006] [notice] i-network-2: ap_get_brigade returned 
70014


why am i getting this \xa7\x0fe instead of  name=value of the post??

thanks.




Nick Kew wrote:
> On Friday 20 October 2006 16:03, Christian Verdelli wrote:
>   
>> -
>> -- Hi,
>>
>> im writing my first simple input filters ; i need it to debug the
>> request body (content of POST) coming to my Web Server before is handled
>> by a third party contect handler module (which corrupt data).
>> I simply want to print out the content of the body request sent by
>> the client . I wrote this peace of code:
>>     
>
> This would be more on-topic on the modules list.
>
> Your code is a little hard to read, with no indentation and some
> obvious typos.
>
>   
>> char *data[bucket->length];
>>     
>
> huh?
>
> Are you trying to do something similar to mod_diagnostics?
> If so, how does it differ?
>
>
>   


Mime
View raw message