Edit report at http://pear.php.net/bugs/bug.php?id=14854&edit=1
ID: 14854
Comment by: bblough@gmail.com
Reported By: rbro at hotmail dot com
Summary: multipart/related responses no longer handled
correctly
Status: Open
Type: Bug
Package: SOAP
Operating System: Linux
Package Version: 0.12.0
PHP Version: 5.2.6
Roadmap Versions:
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-12-31 11:24:29] rbro
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.
------------------------------------------------------------------------
[2008-12-27 20:18:17] doconnor
Ah hah. This looks like a duplicate of Bug #14756
------------------------------------------------------------------------
[2008-12-27 20:11:34] doconnor
Ryan, any chance of making a small executable test case? It'll make it
a lot easier for us to fix that way...
------------------------------------------------------------------------
[2008-10-23 10:04:46] rbro
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.
------------------------------------------------------------------------