Bug #64407 [Com]: Second parameter of md5 & sha1 replace header content-type
| From: | valentiny510 at yahoo dot es | Date: | Mon, 11 Mar 2013 18:14:14 +0000 |
| Subject: | Bug #64407 [Com]: Second parameter of md5 & sha1 replace header content-type | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-177735@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
Comment by: valentiny510 at yahoo dot es
Reported by: valentiny510 at yahoo dot es
Summary: Second parameter of md5 & sha1 replace header
content-type
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:
I use FF and to test is easy.. run the script and the popup windows to download the content with
application/octet-stream will open. Now when you said about IE I tested and works good. Seems the FF
bug then reading the type content from the actual content of the output :O.. Sorry I should been
test this.
Previous Comments:
------------------------------------------------------------------------
[2013-03-11 17:52:40] rasmus@php.net
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.
------------------------------------------------------------------------
[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