Weird numbers around HTTP response body
| From: | tmp1000 at fastmail dot fm | Date: | Mon, 13 Sep 2004 20:21:47 +0000 |
| Subject: | Weird numbers around HTTP response body | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196567@lists.php.net to get a copy of this message | ||
I noticed some numbers mixed with the response generated by my PHP code,
and I can't figure out what's causing it. I've dumbed my PHP script
down to just this (what could be simpler?):
<?php
echo "testing";
?>
And I monitor the HTTP response coming from the server (apache), it
looks like this:
HTTP/1.1 200 OK
Date: Mon, 13 Sep 2004 20:03:21 GMT
Server: Apache/2.0.44 (Unix) PHP/4.3.1
Accept-Ranges: bytes
X-Powered-By: PHP/4.3.1
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
7
testing
0
Note the "7" and the "0". After some experimenting I believe the first
number is the length of the body, then there's the body, and finally a 0
at the end. What gives? How to I get rid of these numbers?
I'm running on linux. The software versions are in the HTTP headers but
in case you missed them, apache 2.0.44 and PHP 4.3.1.
And help is appreciated. Thanks.
-Dave
--
tmp1000@fastmail.fm