From:             
Operating system: Ubuntu Linux
PHP version:      5.2.14
Package:          ICONV related
Bug Type:         Bug
Bug description:The 'iconv_mime_decode_headers' function is skipping headers 

Description:
------------
The above mentioned function is skipping all headers below "Subject:
=?ks_c_5601-1987?B?UkU6odk=?=". Please see the Test script for details.

Test script:
---------------
<?php



$headers = <<< HEADERS

X-Account-Key: account2

X-Mozilla-Keys:

Received: (qmail 7033 invoked from network); 22 Sep 2010 22:36:58 +0200

Received: from mailu.d-server.nl (77.243.232.197)

  by ns250.d-server.nl with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 Sep
2010 22:36:58 +0200

Received-SPF: softfail (ns250.d-server.nl: transitioning SPF record at
spf-d.hotmail.com does not designate 77.243.232.197 as permitted sender)

Received: from blu0-omc1-s18.blu0.hotmail.com ([65.55.116.29])

    by mailu.d-server.nl with esmtp (Exim 4.72)

    (envelope-from <ly_l...@hotmail.com>)

    id 1OyW3V-000314-PM

    for sa...@d-hosting.nl; Wed, 22 Sep 2010 22:36:45 +0200

Received: from BLU143-W18 ([65.55.116.7]) by blu0-omc1-s18.blu0.hotmail.com
with Microsoft SMTPSVC(6.0.3790.4675);

     Wed, 22 Sep 2010 13:36:30 -0700

Message-ID: <blu143-w184dce238f5d110e30d2b789...@phx.gbl>

Content-Type: multipart/alternative;

    boundary="_5faabef1-4b2f-4c37-977f-1cac859be8fc_"

X-Originating-IP: [123.53.127.17]

From: ly le <ly_l...@hotmail.com>

To: <rita.van.ho...@raabkarcher.nl>

Subject: =?ks_c_5601-1987?B?UkU6odk=?=

Date: Wed, 22 Sep 2010 22:36:30 +0200

Importance: Normal

MIME-Version: 1.0

X-OriginalArrivalTime: 22 Sep 2010 20:36:30.0206 (UTC)
FILETIME=[D64B09E0:01CB5A95]

X-Freemail-From: hotmail.com

X-OLS-BogusWarn: No x-mailer header

X-Fake-Warning: OK - 1500 points

X-Filter-ID:
EBeX41zdON1/WS6F8A16Scry9n8e9nAlDAG4uEnVrxnWlQQ8DA2EuQjnekIVwEYMERWeKKG4PAQY

 Nyavp7c49MEiDeiU27bNK6MWc6r/fu8K/7rMaqpnz9Yd9XZIQkQ8USI3MwKmEUYJf9GJ38D865XI

 AbAHneIqHmkglGhfNTnUlDWGeOsBMR8LIBTuWMUK9RODrYcwiXQqz/WrUmIAZCG7X+t1TW39Ja77

 LGPpOwBMBGbLubtCpXj0DRd/MR4N8leOuAdtaqgib7p+ZzXcC1Hvcf3fM3mNrQ59Q/Suw447KKcB

 dq4z+D8utKo08iPkiypR5tCsk9GA489CmWCks4KyjhDWJzYmRAlJPR/rE/nelaj/seXgynpektoc

 ovznGplHcpVCCoX989hgB8R+yKl0dkxDswM/rxLamQaQKQP+RYfqJCPhtNgNFMaRa/ty

X-SpamExperts-Class: unsure;

X-SpamExperts-Score: 0.46817445882

X-SpamExperts-Evidence: 'ole': 0.50; 'crm114': 0.50; 'spambayes.hashed':
0.92;

 'direct': 0.50; 'spambayes.global_tokens': 0.51; 'pyzor': 0.50; 'sa':
0.00;

 'os': 0.97; 'dnsbl': 0.50; 'sender': 0.50

X-SpamExperts-Thermostat:

X-Antivirus: avast! (VPS 100922-0, 22-09-2010), Inbound message

X-Antivirus-Status: Clean

HEADERS;



$headers = iconv_mime_decode_headers($headers,
ICONV_MIME_DECODE_CONTINUE_ON_ERROR, "ISO-8859-1");



var_dump($headers);



Expected result:
----------------
The function should return an associative array containing all headers
which are present in raw headers representation.

Actual result:
--------------
array

  'X-Account-Key' => string 'account2' (length=8)

  'X-Mozilla-Keys' => string '' (length=0)

  'Received' => 

    array

      0 => string '(qmail 7033 invoked from network); 22 Sep 2010 22:36:58
+0200' (length=61)

      1 => string 'from mailu.d-server.nl (77.243.232.197) by
ns250.d-server.nl with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 Sep 2010
22:36:58 +0200' (length=129)

      2 => string 'from blu0-omc1-s18.blu0.hotmail.com ([65.55.116.29]) by
mailu.d-server.nl with esmtp (Exim 4.72) (envelope-from
<ly_l...@hotmail.com>) id 1OyW3V-000314-PM for sa...@d-hosting.nl; Wed, 22
Sep 2010 22:36:45 +0200' (length=210)

      3 => string 'from BLU143-W18 ([65.55.116.7]) by
blu0-omc1-s18.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed,
22 Sep 2010 13:36:30 -0700' (length=136)

  'Received-SPF' => string 'softfail (ns250.d-server.nl: transitioning SPF
record at spf-d.hotmail.com does not designate 77.243.232.197 as permitted
sender)' (length=129)

  'Message-ID' => string '<blu143-w184dce238f5d110e30d2b789...@phx.gbl>'
(length=45)

  'Content-Type' => string 'multipart/alternative;
boundary="_5faabef1-4b2f-4c37-977f-1cac859be8fc_"' (length=72)

  'X-Originating-IP' => string '[123.53.127.17]' (length=15)

  'From' => string 'ly le <ly_l...@hotmail.com>' (length=27)

  'To' => string '<rita.van.ho...@raabkarcher.nl>' (length=31)

  'Subject' => string '=?ks_c_5601-1987?B?UkU6odk' (length=26)



-- 
Edit bug report at http://bugs.php.net/bug.php?id=52941&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52941&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52941&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52941&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52941&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52941&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52941&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52941&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52941&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52941&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52941&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52941&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52941&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52941&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52941&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52941&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52941&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52941&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52941&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52941&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52941&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52941&r=mysqlcfg

Reply via email to