Edit report at https://bugs.php.net/bug.php?id=64407&edit=1
ID: 64407 Updated by: ras...@php.net Reported by: valentiny510 at yahoo dot es Summary: Second parameter of md5 & sha1 replace header content-type -Status: Open +Status: Feedback Type: Bug Package: *Encryption and hash functions Operating System: Windows PHP Version: 5.4.12 Block user comment: N Private report: N New Comment: How are you checking that? IE is notorious for ignoring mime types, so if you are checking with IE you aren't seeing what you think you are seeing. Check with a curl request. There is nothing in PHP that would change this content-type header on you. Previous Comments: ------------------------------------------------------------------------ [2013-03-11 17:23:21] valentiny510 at yahoo dot es 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 this bug report at https://bugs.php.net/bug.php?id=64407&edit=1