You are here

function soap_transport_http::setEncoding in Salesforce Suite 5

Same name in this branch
  1. 5 includes/nusoap.php \soap_transport_http::setEncoding()
  2. 5 includes/nusoap.orig.php \soap_transport_http::setEncoding()
Same name and namespace in other branches
  1. 5.2 includes/nusoap.php \soap_transport_http::setEncoding()
  2. 5.2 includes/nusoap.orig.php \soap_transport_http::setEncoding()

* use http encoding * *

Parameters

string $enc encoding style. supported values: gzip, deflate, or both: * @access public

File

includes/nusoap.php, line 2375

Class

soap_transport_http
transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support

Code

function setEncoding($enc = 'gzip, deflate') {
  if (function_exists('gzdeflate')) {
    $this->protocol_version = '1.1';
    $this->outgoing_headers['Accept-Encoding'] = $enc;
    $this
      ->debug('set Accept-Encoding: ' . $this->outgoing_headers['Accept-Encoding']);
    if (!isset($this->outgoing_headers['Connection'])) {
      $this->outgoing_headers['Connection'] = 'close';
      $this->persistentConnection = false;
      $this
        ->debug('set Connection: ' . $this->outgoing_headers['Connection']);
    }
    set_magic_quotes_runtime(0);

    // deprecated
    $this->encoding = $enc;
  }
}