Home » Web Services » SOAP » Bug #10023
unquoted type parameter text/xml when using HTTP transport and mime attachments
Details
| Submitted | 2007-02-04 18:21 UTC |
|---|---|
| From | damjan dot glad at zejn dot si |
| Assigned | yunosh |
| Status | Closed |
| Package | SOAP |
| PHP Version | 5.1.4 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2007-02-04 18:21 UTC] damjan dot glad at zejn dot si
Description:
------------
When using mime attachments and HTTP transport the resulting HTTP request is invalid. Problem is that "type" parameter in Content-Type header is not quoted. This is not HTTP compliant, e.g. Axis will reject such requests.
This is how the HTTP header type parameter is currently generated: Content-Type: multipart/related; type=text/xml;
This is the correct HTTP header type parameter (it is quoted): Content-Type: multipart/related; type="text/xml";
Test script:
---------------
function SOAP_Base::_makeMimeMessage defines the content type in the following line:
$params = array('content_type' => 'multipart/related; type=text/xml');
Changing this line to:
$params = array('content_type' => 'multipart/related; type="text/xml"');
solves the bug. But the same function is also reused in other contexts:
- SOAP_Server_Email::service
- SOAP_Server_Email_Gateway::service
- SOAP_Server::service
I did not check if the above mentioned "fix" is the right thing to do when called from other three locations. This should be verified and corrected if needed.