Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1115 | minor | always | 05-16-06 15:26 | 05-16-06 18:52 | |
|
|||||
Reporter: | koreth | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.20 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.0.20 | ||
|
|||||
Summary: | 0001115: fgets() on socket strips trailing cr/lf | ||||
Description: |
PHP code: <?php $sock = @fsockopen("localhost", 2222); $line = fgets($sock); print "[" . $line . "]"; ?> I use "nc -l -p 2222" to listen on port 2222, then execute this page (piped through "od -xc" so I can see the exact output). With Zend PHP, if I type "foo" into nc, I get "[foo\n]" as output. With Quercus, I get "[foo]". Trailing carriage returns are stripped too. This doesn't seem to happen on files; if I fopen() a file, fgets() returns the trailing newline on both Quercus and Zend PHP. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|