RE: [PHP] Spurious newlines when requesting empty php file
| From: | Michael Sims | Date: | Fri, 10 Dec 2004 22:26:45 +0000 |
| Subject: | RE: [PHP] Spurious newlines when requesting empty php file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203996@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
> Carl Michael Skog wrote:
>> I would have thought that the response from a empty php file would
>> also be empty, but, to my surprise, they consist of 3 newlines !!!
>
> I just tried this with an empty PHP file, and got exactly what I
> expected.
>
> A valid response with no content at all.
>
> Please specify your software versions, and provide URLs and, as silly
> as this sounds, an "ls -als empty.php" so we can see your empty PHP
> file.
Maybe he's using "lynx -dump <url>" to test this. Lynx adds several newlines
to the
output. However, Links does not:
$ touch empty.php
$ lynx -dump http://localhost/empty.php | od -c
0000000 \n \n \n
0000003
$ links -dump http://localhost/empty.php | od -c
0000000
Just to add to the guessing... :)