Cyril SCETBON wrote:
> Hi people,
> 
> I've got some problem with both cgi and modperl.
> when I post something to /perl/test.pl which just print header and a
> string I got some strange numbers. The post is done with a php script.
> 
> test.pl :
> 
> use strict;
> use CGI qw/:standard/;
> 
> print header;
> print("\ncoucou\n");
> 
> and below is the response the php script got :
> 
> HTTP/1.1 200 OKDate: Tue, 19 Jun 2007 21:39:55 GMTServer: Apache/2.2.3
> (Ubuntu) mod_ssl/2.2.3 OpenSSL/0.9.8c mod_apreq2-20051231/2.6.0
> mod_perl/2.0.2 Perl/v5.8.8Connection: closeTransfer-Encoding:
> chunkedContent-Type: text/html; charset=ISO-8859-18coucou0
> 
> It got 8coucou0 instead of coucou.
> 

because your php script is not handling the chunked transfer encoding
properly.

  http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1

presumably php has some http-specific libraries for POSTing requests so
that all this low-level stuff becomes stuff you don't need to worry about.

--Geoff

Reply via email to