summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorrojaro <>2010-05-31 16:33:21 +0000
committerrojaro <>2010-05-31 16:33:21 +0000
commit25081445c72778e8906312090396657c89cd1dca (patch)
tree64d09b676701053bae5ce6a26b29e9534d910853 /framework
parentfd207518a68243c4d2802177a63567644fd4a620 (diff)
added check for correct HTTP error code
Diffstat (limited to 'framework')
-rw-r--r--framework/Util/TRpcClient.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/Util/TRpcClient.php b/framework/Util/TRpcClient.php
index 964d71a2..c218c52d 100644
--- a/framework/Util/TRpcClient.php
+++ b/framework/Util/TRpcClient.php
@@ -112,6 +112,9 @@ class TRpcClient extends TApplicationComponent
if(($_response = file_get_contents($serverUrl, false, $this->createStreamContext($payload, $mimeType))) === false)
throw new TRpcClientRequestException('RPC request failed');
+ if(substr($http_response_header[0], -6) != '200 OK')
+ throw new TRpcClientResponseException('Server did not respond with HTTP error code 200 ("'.$http_response_header[0].'")');
+
return $_response;
}