diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2015-03-18 11:19:04 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2015-03-18 11:19:04 +0100 |
commit | 09513545a4776e31b5fb113bd8741df1df878816 (patch) | |
tree | 61df3b02c92d2fa5e8f6ed0ef30c6f84396f65b9 | |
parent | e82e995afe2ba6bb600f5a7f2ef6effbf9c1b8cd (diff) | |
download | rpg-09513545a4776e31b5fb113bd8741df1df878816.tar.gz rpg-09513545a4776e31b5fb113bd8741df1df878816.tar.bz2 |
give better error message in HTTPClient for failed crypto setup
-rw-r--r-- | _test/tests/inc/httpclient_http_proxy.test.php | 2 | ||||
-rw-r--r-- | inc/HTTPClient.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/_test/tests/inc/httpclient_http_proxy.test.php b/_test/tests/inc/httpclient_http_proxy.test.php index c44dc7ed7..79b8f8e5e 100644 --- a/_test/tests/inc/httpclient_http_proxy.test.php +++ b/_test/tests/inc/httpclient_http_proxy.test.php @@ -15,7 +15,7 @@ class httpclient_http_proxy_test extends DokuWikiTest { $http->proxy_port = 8080; $data = $http->get($this->url); - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, 'HTTP response: '.$http->error.' ['.$this->url.']'); $this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content'); } }
\ No newline at end of file diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 76d973c38..24b3a8d78 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -604,6 +604,8 @@ class HTTPClient { $requesturl = $requestinfo['path']; return true; } + + throw new HTTPClientException('Failed to set up crypto for secure proxy connection', -151); } throw new HTTPClientException('Failed to establish secure proxy connection', -150); |