PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #6213

Wrong Content-Type on HTTPS requests

Details

Submitted2005-12-09 17:41 UTC
Fromrbro at hotmail dot com
Assignedcweiske
StatusClosed
PackageSOAP
PHP Version5.0.5
OSLinux
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.