You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/10/18 17:31:17 UTC

svn commit: r1185723 - /thrift/trunk/lib/php/src/transport/THttpClient.php

Author: jfarrell
Date: Tue Oct 18 15:31:17 2011
New Revision: 1185723

URL: http://svn.apache.org/viewvc?rev=1185723&view=rev
Log:
Thrift-1393: TTransportException's thrown from THttpClient contain superfluous slashes in the Exception message
Client : php
Patch: Nick Jones

The THttpClient class ensures the $uri_ property has a slash prefixed by appending one if needed in the constructor. However in THttpClient::read, there are 2 exceptions thrown where a slash is concatenated between the port and uri. This results in a superfluous slash in the TTransportException message.


Modified:
    thrift/trunk/lib/php/src/transport/THttpClient.php

Modified: thrift/trunk/lib/php/src/transport/THttpClient.php
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/php/src/transport/THttpClient.php?rev=1185723&r1=1185722&r2=1185723&view=diff
==============================================================================
--- thrift/trunk/lib/php/src/transport/THttpClient.php (original)
+++ thrift/trunk/lib/php/src/transport/THttpClient.php Tue Oct 18 15:31:17 2011
@@ -144,9 +144,9 @@ class THttpClient extends TTransport {
     if ($data === FALSE || $data === '') {
       $md = stream_get_meta_data($this->handle_);
       if ($md['timed_out']) {
-        throw new TTransportException('THttpClient: timed out reading '.$len.' bytes from '.$this->host_.':'.$this->port_.'/'.$this->uri_, TTransportException::TIMED_OUT);
+        throw new TTransportException('THttpClient: timed out reading '.$len.' bytes from '.$this->host_.':'.$this->port_.$this->uri_, TTransportException::TIMED_OUT);
       } else {
-        throw new TTransportException('THttpClient: Could not read '.$len.' bytes from '.$this->host_.':'.$this->port_.'/'.$this->uri_, TTransportException::UNKNOWN);
+        throw new TTransportException('THttpClient: Could not read '.$len.' bytes from '.$this->host_.':'.$this->port_.$this->uri_, TTransportException::UNKNOWN);
       }
     }
     return $data;