Fixing issue #2554 #3170

Closed
wants to merge 5 commits into
from

2 participants

@jcrawford

Removing the transport from the connected host prior to comparing and closing the connection.

@samsonasik samsonasik commented on an outdated diff Dec 5, 2012
library/Zend/Http/Client/Adapter/Socket.php
@@ -189,7 +189,11 @@ public function getStreamContext()
public function connect($host, $port = 80, $secure = false)
{
// If we are connected to the wrong host, disconnect first
- if (($this->connected_to[0] != $host || $this->connected_to[1] != $port)) {
+ $connected_host = (strpos($this->connected_to[0], '://'))
+ ? substr($this->connected_to[0], (strpos($this->connected_to[0], '://') + 3), strlen($this->connected_to[0]))
+ : $this->connected_to[0];
+
+ if (($connected_host != $host || $this->connected_to[1] != $port)) {
@samsonasik
samsonasik added a line comment Dec 5, 2012

i think it's over "((" and "))", should be only :

 if ($connected_host != $host || $this->connected_to[1] != $port) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jcrawford

@samsonasik good call, I failed to notice the double parenthesis. I have fixed this.

@weierophinney weierophinney added a commit that referenced this pull request Dec 11, 2012
@weierophinney weierophinney Merge branch 'hotfix/3170' into develop
Forward port #3170
c0408fc
@weierophinney weierophinney added a commit that closed this pull request Dec 11, 2012
@weierophinney weierophinney Merge branch 'hotfix/3170'
Close #3170
Fixes #2554
3028234
@ghost Unknown pushed a commit that referenced this pull request Jul 14, 2013
@weierophinney weierophinney Merge branch 'hotfix/3170'
Close #3170
Fixes #2554
c3ae477
@ghost Unknown pushed a commit that referenced this pull request Jul 14, 2013
@weierophinney weierophinney Merge branch 'hotfix/3170' into develop
Forward port #3170
f169760
@weierophinney weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/3170' 0a570b5
@weierophinney weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/3170' into develop 83b47da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment