From 711c70c786abf91dc784a002edc4bdab468f3d8e Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Tue, 18 Oct 2011 15:31:17 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1185723 13f79535-47bb-0310-9956-ffa450edef68 --- lib/php/src/transport/THttpClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/php/src/transport/THttpClient.php b/lib/php/src/transport/THttpClient.php index 102dbbb7..880011a0 100644 --- a/lib/php/src/transport/THttpClient.php +++ b/lib/php/src/transport/THttpClient.php @@ -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; -- 2.17.1