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

Bug #14854 multipart/related responses no longer handled correctly
Submitted: 2008-10-23 14:04 UTC
From: rbro Assigned: yunosh
Status: Closed Package: SOAP (version 0.12.0)
PHP Version: 5.2.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-10-23 14:04 UTC] rbro (Ryan Brothers)
Description: ------------ In revision 1.60 of SOAP/Transport/HTTP.php, the following logic was added for HTTP 200 and 202 response codes in the method _parseResponse(): $this->incoming_payload = trim($match[2]); if (!strlen($this->incoming_payload)) { /* Valid one-way message response. */ return true; } This code resets $this->incoming_payload to the body of the HTTP response, removing the HTTP headers. The issue I'm running into is if the HTTP response has a content-type of multipart/related, when _decodeMimeMessage() is called a little farther down, $this->incoming_payload no longer has the HTTP headers, including the boundary string which is needed to correctly parse the incoming message and separate it into its individual parts.

Comments

 [2008-12-28 01:11 UTC] doconnor (Daniel O'Connor)
Ryan, any chance of making a small executable test case? It'll make it a lot easier for us to fix that way...
 [2008-12-28 01:18 UTC] doconnor (Daniel O'Connor)
Ah hah. This looks like a duplicate of Bug #14756
 [2008-12-31 16:24 UTC] rbro (Ryan Brothers)
I see a test case was posted in the other issue 14756, but I just attached the patch file that I ran against version 0.12.0 on my system that fixes the issue for me.
 [2010-01-06 03:06 UTC] bblough (Bill Blough)
I can confirm this. I received a parser error "Invalid document end" when consuming a JAX-based webservice. Investigation shows that the 'content-type: multipart/related' header was being stripped from the message, resulting in the message not being fully MIME-decoded. Applying the posted patch resolves.
 [2010-01-06 16:56 UTC] yunosh (Jan Schneider)
-Status: Open +Status: Closed -Assigned To: +Assigned To: yunosh
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.