|
@@ 4598-4609 (lines=12) @@
|
| 4595 |
|
|
| 4596 |
|
return false; |
| 4597 |
|
} |
| 4598 |
|
if (strpos($headers['content-type'], '=')) { |
| 4599 |
|
$enc = str_replace('"', '', substr(strstr($headers['content-type'], '='), 1)); |
| 4600 |
|
$this->debug('Got response encoding: ' . $enc); |
| 4601 |
|
if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { |
| 4602 |
|
$this->xml_encoding = strtoupper($enc); |
| 4603 |
|
} else { |
| 4604 |
|
$this->xml_encoding = 'US-ASCII'; |
| 4605 |
|
} |
| 4606 |
|
} else { |
| 4607 |
|
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 |
| 4608 |
|
$this->xml_encoding = 'ISO-8859-1'; |
| 4609 |
|
} |
| 4610 |
|
$this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); |
| 4611 |
|
// parse response, get soap parser obj |
| 4612 |
|
$parser = new nusoap_parser($data, $this->xml_encoding, '', $this->decode_utf8); |
|
@@ 8144-8155 (lines=12) @@
|
| 8141 |
|
|
| 8142 |
|
return false; |
| 8143 |
|
} |
| 8144 |
|
if (strpos($headers['content-type'], '=')) { |
| 8145 |
|
$enc = str_replace('"', '', substr(strstr($headers['content-type'], '='), 1)); |
| 8146 |
|
$this->debug('Got response encoding: ' . $enc); |
| 8147 |
|
if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { |
| 8148 |
|
$this->xml_encoding = strtoupper($enc); |
| 8149 |
|
} else { |
| 8150 |
|
$this->xml_encoding = 'US-ASCII'; |
| 8151 |
|
} |
| 8152 |
|
} else { |
| 8153 |
|
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 |
| 8154 |
|
$this->xml_encoding = 'ISO-8859-1'; |
| 8155 |
|
} |
| 8156 |
|
$this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); |
| 8157 |
|
$parser = new nusoap_parser($data, $this->xml_encoding, $this->operation, $this->decode_utf8); |
| 8158 |
|
// add parser debug data to our debug |