Anonymous | Login | Signup for a new account | 12-17-2024 10:52 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001115 | [Quercus] | minor | always | 05-16-06 15:26 | 05-16-06 18:52 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.0.20 | Product Version | 3.0.20 | ||||
Product Build | |||||||||
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 | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |