Home » Mail » Mail_Mime » Bug #465
boundary= on ln 223 should not have "'s
Details
| Submitted | 2003-12-19 22:06 UTC |
|---|---|
| From | ddykshoorn at speedlinesolutions dot com |
| Status | Bogus |
| Package | Mail_Mime |
| PHP Version | 4.3.4 |
| OS | WinXP Pro |
| Roadmaps | (Not assigned) |
Comments
[2003-12-19 22:06 UTC] ddykshoorn at speedlinesolutions dot com
Description:
------------
This is related to a bug #38 but the double quote issue has much bigger consiquences.
On line 223 of mimePart.php rev 1.11 you will see this line:
$this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
this should be:
$this->_headers['Content-Type'] .= ';boundary=' . $boundary;
to match www.w3.org definitions.
When testing mime attachments I found an interop glitch with this declaration of boundary. According to the definition at www.w3.org boundary should not have double quotes (") around it. Also it should not contain a \r\n\t (Carriage Return, LineFeed) as it causes certain parsers to ... Freak out. I discovered this problem when we were trying to create a SOAP client in Delphi using a SOAP Server using PEAR::SOAP.
Reproduce code:
---------------
Line 226 actual:
$this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
Line 226 should be:
$this->_headers['Content-Type'] .= ';boundary=' . $boundary;
Expected result:
----------------
Headers that should be produced for the SOAP package.
Status: 200 OK
Content-Type: multipart/related; type=text/xml;boundary==_4b0fa085e3fa3b05eb40536cb0f386e6
Server: PEAR-SOAP 0.7.5-devel
Content-Length: 12140
Actual result:
--------------
Headers that are produced for the SOAP package.
Status: 200 OK
Content-Type: multipart/related; type=text/xml;boundary="=_4b0fa085e3fa3b05eb40536cb0f386e6"
Server: PEAR-SOAP 0.7.5-devel
Content-Length: 12140
[2003-12-20 11:40 UTC] richard at php dot net
w3.org does not define mail specs.