From: valentiny510 at yahoo dot es Operating system: Windows PHP version: 5.4.12 Package: *Encryption and hash functions Bug Type: Bug Bug description:Second parameter of md5 & sha1 replace header content-type
Description: ------------ If I set the header(text/plain) and want to echo sha1/md5('something', true); the result header will be application/octet-stream replacing the actual header. With text/html it works correctly but I think it should work with plain text too. Test script: --------------- <?php header('Content-Type: text/plain; charset=UTF-8', true); echo 'something ', sha1('encoded', true), ' blabla'; Expected result: ---------------- something Â¥d[¶wxÃG£³fÃRwÃTõÃè blabla Actual result: -------------- Content-Type replaced by application/octet-stream -- Edit bug report at https://bugs.php.net/bug.php?id=64407&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64407&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64407&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64407&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64407&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64407&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64407&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64407&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64407&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64407&r=support Expected behavior: https://bugs.php.net/fix.php?id=64407&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64407&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64407&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64407&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64407&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64407&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64407&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64407&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64407&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64407&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64407&r=mysqlcfg