RE: [SOAP] patch for PEAR::SOAP over HTTPS/SSL with certificates
| From: | LIMBOURG Arnaud | Date: | Wed, 19 Mar 2003 12:55:52 +0000 |
| Subject: | RE: [SOAP] patch for PEAR::SOAP over HTTPS/SSL with certificates | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-482@lists.php.net to get a copy of this message | ||
I noticed a problem in the curl SSL implementation, the payload is taken
from a call to regular http method. It would be better to let curl handle
the whole process of building the request.
So there is is a need to just get the xml content to send along with the
request.
$action =
isset($options['soapaction'])?$options['soapaction']:'';
$fullpath = $this->urlparts['path'].
(isset($this->urlparts['query'])?'?'.$this->urlparts['query']:'').
(isset($this->urlparts['fragment'])?'#'.$this->urlparts['fragment']:'');
if (isset($options['proxy_host'])) {
$fullpath = 'http://' .
$this->urlparts['host'] . ':' .
$this->urlparts['port'] . $fullpath;
}
if (isset($options['proxy_user'])) {
$this->headers['Proxy-Authorization'] = 'Basic ' .
base64_encode($options['proxy_user'].":".$options['proxy_pass']);
}
$this->headers['User-Agent'] = $this->_userAgent;
$this->headers['Host'] = $this->urlparts['host'];
$this->headers['Content-Type'] = "text/xml;
charset=$this->encoding";
$this->headers['Content-Length'] = strlen($msg);
$this->headers['SOAPAction'] = "\"$action\"";
if (isset($options['headers'])) {
$this->headers = array_merge($this->headers,
$options['headers']);
}
$headers = '';
foreach ($this->headers as $k => $v) {
$headers .= "$k: $v\r\n";
}
$this->outgoing_payload =
"POST $fullpath HTTP/1.0\r\n".
$headers."\r\n".
$msg;
return $this->outgoing_payload;
So outgoing_payload is the whole request. Which is not good when using with
curl.
I appear unclear enven to myself :/