Home » Web Services » SOAP » Bug #6213
Wrong Content-Type on HTTPS requests
Details
| Submitted | 2005-12-09 17:41 UTC |
|---|---|
| From | rbro at hotmail dot com |
| Assigned | cweiske |
| Status | Closed |
| Package | SOAP |
| PHP Version | 5.0.5 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-12-09 17:41 UTC] rbro at hotmail dot com
Description:
------------
When sending a multipart/related SOAP message (a message with a SOAP attachment) to a HTTPS URL, the Content-Type is not preserved. Instead of "multipart/related", a Content-Type of "text/xml" is sent.
Line 572 of Transport/HTTP.php has:
curl_setopt($ch, CURLOPT_HTTPHEADER , array('Content-Type: text/xml;charset=' . $this->encoding, 'SOAPA
ction: "'.$options['soapaction'].'"'));
I believe it instead should be something like:
if (!isset($options['headers']['Content-Type'])) {
$options['headers']['Content-Type'] = 'text/xml';
}
curl_setopt($ch, CURLOPT_HTTPHEADER , array('Content-Type: '. $options['headers']['Content-Type'].';charset=' . $this->encoding, 'SOAPAction: "'.$o
ptions['soapaction'].'"'));
[2006-03-09 14:13 UTC] rbro at hotmail dot com
Do you know when this code will be rewritten? In the meantime, I am running a modified version of PEAR SOAP to resolve this problem. Thanks.