PHP 4.0 Bug #9303: read() called with 'length' parameter reads until byte with ascii 10 or 13
| From: | yuri dot ismailov at era dot ericsson dot se | Date: | Fri, 16 Feb 2001 16:30:40 +0000 |
| Subject: | PHP 4.0 Bug #9303: read() called with 'length' parameter reads until byte with ascii 10 or 13 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46748@lists.php.net to get a copy of this message | ||
From: yuri.ismailov@era.ericsson.se
Operating system: RedHat Linux
PHP version: 4.0.4pl1
PHP Bug Type: Sockets related
Bug description: read() called with 'length' parameter reads until byte with ascii 10 or
13
read($sockfd, $in, $length); If I read an arbitrary byte stream from the socket and it happens to be
ascii code (decimal) 10 or 13, the length parameter does not have any affect on the number of bytes
read from the socket. It stops at the first occurence of the "magic" byte. To continue
reading you have to call read again. It does not look like so in the manual for the read() function.
However, bytes following ascii \0 and \t are succesfully read.
Is this is the feature or a bug?
PHP compiled --with-apxs --enable-sockets
--
Edit Bug report at: http://bugs.php.net/?id=9303&edit=1