Bug #68431 [NEW]: Error Fetching http headers
| From: | james at auderecommerce dot com | Date: | Mon, 17 Nov 2014 00:03:19 +0000 |
| Subject: | Bug #68431 [NEW]: Error Fetching http headers | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188626@lists.php.net to get a copy of this message | ||
From: james at auderecommerce dot com
Operating system: Windows 8.1 Pro x64
PHP version: 5.6.3
Package: SOAP related
Bug Type: Bug
Bug description:Error Fetching http headers
Description:
------------
SoapClient is not honouring stream_context_create, and is also returning
a cryptic error (Error Fetching http headers).
The error is triggered as PHP is not returning HTTP headers
(https://github.com/php/php-src/blob/PHP-5.6.3/ext/soap/php_http.c#L884).
However, in SoapUI Pro the request/response is valid (ruling out an
error with the server).
Test script:
---------------
$context = stream_context_create(array(
'http' => array(
'header' => 'Connection: Close'
)
));
$client = new Zend\Soap\Client('https://www.example.com/', array(
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
'stream_context' => $context
));
$session = $client->login('foo', 'bar');
$filter = array(
'complex_filter' => array(
array(
'key' => 'created_at',
'value' => array(
'key' => 'from',
'value' => '2014-11-16 01:01:01'
)
)
));
$result = $client->salesOrderList($session, $filter);
Expected result:
----------------
POST /index.php/api/v2_soap/index/ HTTP/1.1
Host: www.example.com
Connection: Close
User-Agent: PHP-SOAP/5.6.3
Content-Type: application/soap+xml; charset=utf-8;
action="urn:Mage_Api_Model_Server_V2_HandlerAction"
Content-Length: 881
Cookie: PHPSESSID=sessionId;
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope ...
HTTP/1.1 200 OK
Date: Sun, 16 Nov 2014 23:50:50 GMT
Server: Apache
Set-Cookie: PHPSESSID=sessionId; expires=Mon, 17-Nov-2014 00:50:50 GMT;
path=/; domain=www.example.com; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding,User-Agent
Content-Length: 7362
Connection: keep-alive, close
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope ...
Actual result:
--------------
POST /index.php/api/v2_soap/index/ HTTP/1.1
Host: www.example.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.6.3
Content-Type: application/soap+xml; charset=utf-8;
action="urn:Mage_Api_Model_Server_V2_HandlerAction"
Content-Length: 881
Cookie: PHPSESSID=sessionId;
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope ...
HTTP/1.1 200 OK
Date: Sun, 16 Nov 2014 23:48:24 GMT
Server: Apache
Set-Cookie: PHPSESSID=sessionId; expires=Mon, 17-Nov-2014 00:48:24 GMT;
path=/; domain=www.example.com; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Length: 580
Connection: keep-alive, close
Vary: User-Agent,Accept-Encoding
Content-Type: text/xml; charset=UTF-8
Empty response / Error Fetching http headers
--
Edit bug report at https://bugs.php.net/bug.php?id=68431&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68431&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68431&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68431&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68431&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68431&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68431&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68431&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68431&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68431&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68431&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68431&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68431&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68431&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68431&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68431&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68431&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68431&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68431&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68431&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68431&r=mysqlcfg