From:             
Operating system: 
PHP version:      5.4.0RC1
Package:          SOAP related
Bug Type:         Feature/Change Request
Bug description:New keep_alive option

Description:
------------
When using the SoapClient you may sometime have this error :

SoapClient::__doRequest(): send of 776 bytes failed with errno=32 Broken
pipe

The problem is that some servers that you're calling are closing the
connection 
after some time. To fix this problem you need to use the "Connection:
close" 
HTTP Header. The only way to do it currently is to use a stream_context
with the 
1.0 HTTP protocol version :

$socket_context = stream_context_create(
       array('http' => array('protocol_version'  => 1.0))
);
$soapClient = new \SOAPClient($serviceUrl, array('stream_context' => 
$socket_context));

It would be nice to have a new option "keep_alive" that you can disable
like 
this :

$soapClient = new \SOAPClient(ServiceUrl, array('keep_alive' => false));


Test script:
---------------
$soapClient = new \SOAPClient(ServiceUrl, array('keep_alive' => false));

Expected result:
----------------
Request with "Connection: close" header

Actual result:
--------------
Request with "Connection: Keep-alive" header

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60329&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60329&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60329&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60329&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60329&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60329&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60329&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60329&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60329&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60329&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60329&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60329&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60329&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60329&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60329&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60329&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60329&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60329&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60329&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60329&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60329&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60329&r=mysqlcfg

Reply via email to