Subscribe

HTTP Proxy bug

  1. 2010-04-07 05:29:17 PDT
    After trying to get NuSOAP to work behind a firewall, I found that there was actually a bug in NuSOAP that prevent the HTTP Proxy port from being used. The bug is not difficult to replicate: $client->setHTTPProxy('192.168.0.1','8080'); should use port 8080 to connect to the HTTP proxy. instead it uses the port it got via the wsdl. The fix is easy. Maybe this can be added to this version of NuSOAP as well? Around line 2323 in nusoap.php, as part of the 'connect' function in the soap_transport_http class: // open socket if($connection_timeout > 0){ $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); } else { $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); } should be changed to: // open socket if($connection_timeout > 0){ $this->fp = @fsockopen( $host, $port, $this->errno, $this->error_str, $connection_timeout); } else { $this->fp = @fsockopen( $host, $port, $this->errno, $this->error_str); } marcel
  2. 2010-04-07 05:31:09 PDT
    Not sure what happened in my previous post, but the new code should read: // open socket if($connection_timeout > 0){ $this->fp = @fsockopen( $host, $port, $this->errno, $this->error_str, $connection_timeout); } else { $this->fp = @fsockopen( $host, $port, $this->errno, $this->error_str); }
  3. 2010-04-27 05:38:05 PDT
    I have committed your patch to upstream code : http://nusoap.cvs.sourceforge.net/viewvc/nusoap/lib/class.soap_transport_http.php?r1=1.68&r2=1.69 Thanks.
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.