Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.8

Bug #11439 Headers having \n instead of \r\n
Submitted: 2007-06-26 10:31 UTC
From: corni Assigned:
Status: No Feedback Package: Net_POP3 (version 1.3.6)
PHP Version: 5.2.3 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-06-26 10:31 UTC] corni (Cornelius Herzog)
Description: ------------ Some mails have in their headers only \n instead of \r\n. Than the getParsedHeaders function will fail! Expected result: ---------------- Pretty easy to solve: Replace the to lines (in the function getParsedHeaders) $raw_headers = preg_replace("/\r\n[ \t]+/", ' ', $raw_headers); $raw_headers = explode("\r\n", $raw_headers); with these four lines: if(!strstr($raw_headers,"\r\n")) { $raw_headers = preg_replace("/\n[ \t]+/", ' ', $raw_headers); // Unfold headers $raw_headers = explode("\n", $raw_headers); }else{ $raw_headers = preg_replace("/\r\n[ \t]+/", ' ', $raw_headers); // Unfold headers $raw_headers = explode("\r\n", $raw_headers); }

Comments

 [2009-07-24 11:54 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. Without a unit test, I'm hesitant to mess with it.
 [2011-09-29 14:14 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: No Feedback