Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #1141 Feature Request (with diff) - socket connect options
Submitted: 2004-04-06 00:13 UTC
From: justinpatrin Assigned: avb
Status: Closed Package: HTTP_Request
PHP Version: Irrelevant OS: N/A
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 1 + 3 = ?

 
 [2004-04-06 00:13 UTC] justinpatrin
Description: ------------ I have just submitted a feature request for Net_Socket which allows passing of options to stream_context_create (this allows, among other things, setting up of client SSL certificates.). This diff adds support for these options to HTTP_Request (and HTTP_Client by proxy). The name of the option and variable can, of course, be changed by you to what you think it should be named. --- Request.cvs.orig.php 2004-04-05 17:13:40.000000000 -0700 +++ Request.cvs.php 2004-04-05 17:21:44.000000000 -0700 @@ -186,6 +186,12 @@ var $_saveBody = true; /** + * Options to pass to Net_Socket::connect. See stream_context_create + * @var array + */ + var $_socketOptions; + + /** * Constructor * * Sets up the object @@ -551,7 +557,7 @@ // If this is a second request, we may get away without // re-connecting if they're on the same server - if ( PEAR::isError($err = $this->_sock->connect($host, $port, null, $this->_timeout)) + if ( PEAR::isError($err = $this->_sock->connect($host, $port, null, $this->_timeout, $this->_socketOptions)) OR PEAR::isError($err = $this->_sock->write($this->_buildRequest())) ) { return $err;

Comments

 [2004-04-07 17:57 UTC] justinpatrin
The patch has been applied to Net_Socket (in CVS).
 [2004-04-10 10:40 UTC] avb
Will be applied as soon as new Net_Socket is released.
 [2004-04-26 23:04 UTC] chagenbu
Net_Socket 1.0.2 was released today.
 [2004-04-29 13:09 UTC] avb
Patch applied