Bug #64407 [Opn->Fbk]: Second parameter of md5 & sha1 replace header content-type

From: Date: Mon, 11 Mar 2013 17:52:40 +0000
Subject: Bug #64407 [Opn->Fbk]: Second parameter of md5 & sha1 replace header content-type
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177734@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64407&edit=1 ID: 64407 Updated by: rasmus@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

« previous php.bugs (#177734) next »