drop deprecated calls from demo and co
authorgggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 17:30:53 +0000 (17:30 +0000)
committergggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 17:30:53 +0000 (17:30 +0000)
12 files changed:
debugger/action.php
demo/client/getstatename.php
demo/client/windowscharset.php
demo/server/discuss.php
demo/server/methodProviders/functions.php
demo/server/methodProviders/testsuite.php
demo/server/methodProviders/validator1.php
demo/server/methodProviders/wrapper.php
demo/server/proxy.php
demo/vardemo.php
extras/benchmark.php
tests/09HTTPTest.php

index cc87075..326ea2f 100644 (file)
@@ -133,8 +133,8 @@ if ($action) {
         }
 
         if ($protocol == 2 || $protocol == 3) {
-            $client->setSSLVerifyPeer($verifypeer);
-            $client->setSSLVerifyHost($verifyhost);
+            $client->setOption(\PhpXmlRpc\Client::OPT_VERIFY_PEER, $verifypeer);
+            $client->setOption(\PhpXmlRpc\Client::OPT_VERIFY_HOST, $verifyhost);
             if ($cainfo) {
                 $client->setCaCertificate($cainfo);
             }
@@ -159,28 +159,28 @@ if ($action) {
 
         switch ($requestcompression) {
             case 0:
-                $client->request_compression = '';
+                $client->setOption(\PhpXmlRpc\Client::OPT_REQUEST_COMPRESSION, '');
                 break;
             case 1:
-                $client->request_compression = 'gzip';
+                $client->setOption(\PhpXmlRpc\Client::OPT_REQUEST_COMPRESSION, 'gzip');
                 break;
             case 2:
-                $client->request_compression = 'deflate';
+                $client->setOption(\PhpXmlRpc\Client::OPT_REQUEST_COMPRESSION, 'deflate');
                 break;
         }
 
         switch ($responsecompression) {
             case 0:
-                $client->accepted_compression = '';
+                $client->setOption(\PhpXmlRpc\Client::OPT_ACCEPTED_COMPRESSION, '');
                 break;
             case 1:
-                $client->accepted_compression = array('gzip');
+                $client->setOption(\PhpXmlRpc\Client::OPT_ACCEPTED_COMPRESSION, array('gzip'));
                 break;
             case 2:
-                $client->accepted_compression = array('deflate');
+                $client->setOption(\PhpXmlRpc\Client::OPT_ACCEPTED_COMPRESSION, ('deflate'));
                 break;
             case 3:
-                $client->accepted_compression = array('gzip', 'deflate');
+                $client->setOption(\PhpXmlRpc\Client::OPT_ACCEPTED_COMPRESSION, array('gzip', 'deflate'));
                 break;
         }
 
@@ -586,7 +586,7 @@ if ($action) {
 
     <h3>Changelog</h3>
     <ul>
-        <li>2023-XX-YY: display in the top row the version of the libraries in use; made the generated code throw instead
+        <li>2023-02-YY: display in the top row the version of the libraries in use; made the generated code throw instead
             of returning a Response object on error; fixes for the json-rpc debugger</li>
         <li>2022-12-18: fix XSS vulnerability in the debugger; load jsxmlrpc from CDN; minor improvements</li>
         <li>2022-11-28: allow to use http/2 protocol; two security issues fixed in the underlying library</li>
index b69cb77..22e60f0 100644 (file)
@@ -33,7 +33,7 @@ if (isset($_POST['stateno']) && $_POST['stateno'] != "") {
         // NB: we are _assuming_ that the server did return a scalar xml-rpc value here.
         // If the server is not trusted, we might check that via `$val->kindOf() == 'scalar'`
         output('<br/>State number <b>' . $stateNo . '</b> is <b>'
-            . htmlspecialchars($val->scalarval()) . '</b><br/><br/>');
+            . htmlspecialchars($val->scalarVal()) . '</b><br/><br/>');
     } else {
         output('An error occurred: ');
         output('<pre>Code: ' . htmlspecialchars($resp->faultCode())
index c2c425b..bdacc48 100644 (file)
@@ -41,7 +41,7 @@ $c->setOption(Client::OPT_ACCEPTED_CHARSET_ENCODINGS, array('UTF-8'));
 $c->setOption(Client::OPT_REQUEST_CHARSET_ENCODING, 'UTF-8');
 
 $r = $c->send(new Request('examples.stringecho', array(new Value($input))));
-$output = $r->value()->scalarval();
+$output = $r->value()->scalarVal();
 
 echo "This is the value we got back from the server (in CP-1252): ";
 var_dump($output);
index 20a4ff6..0cba918 100644 (file)
@@ -47,7 +47,7 @@ $srv->setOption(Server::OPT_FUNCTIONS_PARAMETERS_TYPE, 'phpvals');
 
 // let code exceptions float all the way to the remote caller as xml-rpc faults - it helps debugging.
 // At the same time, it opens a wide security hole, and should never be enabled on public or production servers...
-//$srv->exception_handling = 1;
+//$srv->->setOption(Server::OPT_EXCEPTION_HANDLING, 1);
 
 // NB: take care not to output anything else after this call, as it will mess up the responses and it will be hard to
 // debug. In case you have to do so, at least re-emit a correct Content-Length http header (requires output buffering)
index 2949034..045574d 100644 (file)
@@ -51,7 +51,7 @@ class exampleMethods
         $sno = $req->getParam(0);
 
         // extract the value of the state number
-        $snv = $sno->scalarval();
+        $snv = $sno->scalarVal();
 
         // look it up in our array (zero-based)
         if (isset(self::$stateNames[$snv - 1])) {
@@ -132,7 +132,7 @@ And the array will be returned with the entries sorted by their numbers.';
         $s = $req->getParam(0);
         $t = $req->getParam(1);
 
-        return new Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcInt));
+        return new Response(new Value($s->scalarVal() + $t->scalarVal(), Value::$xmlrpcInt));
     }
 
     public static $addtwodouble_sig = array(array('double', 'double', 'double'));
@@ -142,7 +142,7 @@ And the array will be returned with the entries sorted by their numbers.';
         $s = $req->getParam(0);
         $t = $req->getParam(1);
 
-        return new Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcDouble));
+        return new Response(new Value($s->scalarVal() + $t->scalarVal(), Value::$xmlrpcDouble));
     }
 
     public static $stringecho_sig = array(array('string', 'string'));
@@ -150,7 +150,7 @@ And the array will be returned with the entries sorted by their numbers.';
     public static function stringEcho($req)
     {
         // just sends back a string
-        return new Response(new Value($req->getParam(0)->scalarval()));
+        return new Response(new Value($req->getParam(0)->scalarVal()));
     }
 
     public static $echoback_sig = array(array('string', 'string'));
@@ -178,7 +178,7 @@ And the array will be returned with the entries sorted by their numbers.';
         // This is to test that base64 encoding is working as expected
         $incoming = $req->getParam(0);
 
-        return new Response(new Value($incoming->scalarval(), Value::$xmlrpcString));
+        return new Response(new Value($incoming->scalarVal(), Value::$xmlrpcString));
     }
 
     public static $bitflipper_sig = array(array('array', 'array'));
@@ -189,7 +189,7 @@ And the array will be returned with the entries sorted by their numbers.';
         $rv = new Value(array(), Value::$xmlrpcArray);
 
         foreach ($v as $b) {
-            if ($b->scalarval()) {
+            if ($b->scalarVal()) {
                 $rv[] = new Value(false, Value::$xmlrpcBoolean);
             } else {
                 $rv[] = new Value(true, Value::$xmlrpcBoolean);
@@ -228,32 +228,32 @@ mimetype, a string, is a standard MIME type, for example, text/plain.';
         $mBcc = $req->getParam(5);
         $mMime = $req->getParam(6);
 
-        if ($mTo->scalarval() == "") {
+        if ($mTo->scalarVal() == "") {
             $err = "Error, no 'To' field specified";
         }
 
-        if ($mFrom->scalarval() == "") {
+        if ($mFrom->scalarVal() == "") {
             $err = "Error, no 'From' field specified";
         }
 
         /// @todo in real life, we should check for presence of return characters to avoid header injection!
 
-        $msgHdr = "From: " . $mFrom->scalarval() . "\n";
-        $msgHdr .= "To: " . $mTo->scalarval() . "\n";
+        $msgHdr = "From: " . $mFrom->scalarVal() . "\n";
+        $msgHdr .= "To: " . $mTo->scalarVal() . "\n";
 
-        if ($mCc->scalarval() != "") {
-            $msgHdr .= "Cc: " . $mCc->scalarval() . "\n";
+        if ($mCc->scalarVal() != "") {
+            $msgHdr .= "Cc: " . $mCc->scalarVal() . "\n";
         }
-        if ($mBcc->scalarval() != "") {
-            $msgHdr .= "Bcc: " . $mBcc->scalarval() . "\n";
+        if ($mBcc->scalarVal() != "") {
+            $msgHdr .= "Bcc: " . $mBcc->scalarVal() . "\n";
         }
-        if ($mMime->scalarval() != "") {
-            $msgHdr .= "Content-type: " . $mMime->scalarval() . "\n";
+        if ($mMime->scalarVal() != "") {
+            $msgHdr .= "Content-type: " . $mMime->scalarVal() . "\n";
         }
         $msgHdr .= "X-Mailer: XML-RPC for PHP mailer 1.0";
 
         if ($err == "") {
-            if (!mail("", $mSub->scalarval(), $mBody->scalarval(), $msgHdr)) {
+            if (!mail("", $mSub->scalarVal(), $mBody->scalarVal(), $msgHdr)) {
                 $err = "Error, could not send the mail.";
             }
         }
index 2c6f2f1..095f610 100644 (file)
@@ -69,10 +69,10 @@ function findStateWithNulls($req)
     $a = $req->getParam(0);
     $b = $req->getParam(1);
 
-    if ($a->scalartyp() == Value::$xmlrpcNull)
-        return new Response(new Value(plain_findstate($b->scalarval())));
+    if ($a->scalarTyp() == Value::$xmlrpcNull)
+        return new Response(new Value(plain_findstate($b->scalarVal())));
     else
-        return new Response(new Value(plain_findstate($a->scalarval())));
+        return new Response(new Value(plain_findstate($a->scalarVal())));
 }
 
 return array(
index f42f8c1..e8f7183 100644 (file)
@@ -24,7 +24,7 @@ return array(
             foreach ($sno as $str) {
                 foreach ($str as $key => $val) {
                     if ($key == "curly") {
-                        $numCurly += $val->scalarval();
+                        $numCurly += $val->scalarVal();
                     }
                 }
             }
@@ -44,7 +44,7 @@ return array(
             $moe = $sno["moe"];
             $larry = $sno["larry"];
             $curly = $sno["curly"];
-            $num = $moe->scalarval() + $larry->scalarval() + $curly->scalarval();
+            $num = $moe->scalarVal() + $larry->scalarVal() + $curly->scalarVal();
 
             return new Response(new Value($num, Value::$xmlrpcInt));
         }
@@ -99,7 +99,7 @@ return array(
             $first = $ar[0];
             $last = $ar[$sz - 1];
 
-            return new Response(new Value($first->scalarval() . $last->scalarval(), Value::$xmlrpcString));
+            return new Response(new Value($first->scalarVal() . $last->scalarVal(), Value::$xmlrpcString));
         }
     ),
 
@@ -111,7 +111,7 @@ return array(
         "function" => function ($req)
         {
             $sno = $req->getParam(0);
-            $v = $sno->scalarval();
+            $v = $sno->scalarVal();
 
             return new Response(new Value(
                 array(
@@ -140,7 +140,7 @@ return array(
             $larry = $fools["larry"];
             $moe = $fools["moe"];
 
-            return new Response(new Value($curly->scalarval() + $larry->scalarval() + $moe->scalarval(), Value::$xmlrpcInt));
+            return new Response(new Value($curly->scalarVal() + $larry->scalarVal() + $moe->scalarVal(), Value::$xmlrpcInt));
         }
     ),
 
@@ -152,7 +152,7 @@ return array(
         "function" => function ($req)
         {
             $sno = $req->getParam(0);
-            $str = $sno->scalarval();
+            $str = $sno->scalarVal();
             $gt = 0;
             $lt = 0;
             $ap = 0;
index 3a9081b..11eae41 100644 (file)
@@ -69,7 +69,7 @@ class handlersContainer
         if ($req->getNumParams()) {
             $p1 = $req->getParam(0);
             if ($p1->kindOf() === 'scalar') {
-                $errNum = (int)$p1->scalarval();
+                $errNum = (int)$p1->scalarVal();
             }
         }
         throw new Exception("it's just a test", $errNum);
index 33876d9..9ca3d4c 100644 (file)
@@ -42,7 +42,7 @@ function forward_request($req)
 
     // create client
     $timeout = 0;
-    $url = $req->getParam(0)->scalarval();
+    $url = $req->getParam(0)->scalarVal();
     // *** NB *** here we should validate the received url, using f.e. a whitelist of approved servers _and protocols_...
     //            fe. any url using the 'file://' protocol might be considered a hacking attempt
     $client = new Client($url);
@@ -59,8 +59,8 @@ function forward_request($req)
                 case 'followRedirects':
                     // requires cURL to be enabled
                     if ($val) {
-                        $client->use_curl = Client::USE_CURL_ALWAYS;
-                        $client->setCurlOptions(array(CURLOPT_FOLLOWLOCATION => true, CURLOPT_POSTREDIR => 3));
+                        $client->setOption(Client::OPT_USE_CURL, Client::USE_CURL_ALWAYS);
+                        $client->setOption(Client::OPT_EXTRA_CURL_OPTS, array(CURLOPT_FOLLOWLOCATION => true, CURLOPT_POSTREDIR => 3));
                     }
                 case 'Cookies':
                     /// @todo add support for this if needed
@@ -75,16 +75,16 @@ function forward_request($req)
                 case 'RequestCharsetEncoding':
                     // allow the server to work as charset transcoder.
                     // NB: works best with mbstring enabled
-                    $client->request_charset_encoding = $val;
+                    $client->setOption(Client::OPT_REQUEST_CHARSET_ENCODING, $val);
                     break;
                 case 'RequestCompression':
-                    $client->setRequestCompression($val);
+                    $client->setOption(Client::OPT_REQUEST_COMPRESSION, $val);
                     break;
                 case 'SSLVerifyHost':
-                    $client->setSSLVerifyHost($val);
+                    $client->setOption(Client::OPT_VERIFY_HOST, $val);
                     break;
                 case 'SSLVerifyPeer':
-                    $client->setSSLVerifyPeer($val);
+                    $client->setOption(Client::OPT_VERIFY_PEER, $val);
                     break;
                 case 'Timeout':
                     $timeout = (integer)$val;
@@ -98,7 +98,7 @@ function forward_request($req)
     ///       - as xml comments in the payload, or
     ///       - using std http header conventions, such as X-forwarded-for (but public servers should strip
     ///         X-forwarded-for anyway, unless they consider this server as trusted...)
-    $reqMethod = $req->getParam(1)->scalarval();
+    $reqMethod = $req->getParam(1)->scalarVal();
     $req = new Request($reqMethod);
     if ($req->getNumParams() > 1) {
         $pars = $req->getParam(2);
index 20a6b22..69793d5 100644 (file)
@@ -28,7 +28,7 @@ output("Datetime (from php DateTime): <PRE>" . htmlentities($v->serialize()) . "
 
 $v = new PhpXmlRpc\Value('hello world', 'base64');
 output("Base64: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
-output("(value of base64 string is: '" . $v->scalarval() . "')<BR><BR>");
+output("(value of base64 string is: '" . $v->scalarVal() . "')<BR><BR>");
 
 $v = new PhpXmlRpc\Value(
     array(
index c064bc8..b8f5521 100644 (file)
@@ -93,7 +93,7 @@ begin_test('Data encoding (large array)', 'manual encoding');
 for ($i = 0; $i < $num_tests; $i++) {
     $vals = array();
     for ($j = 0; $j < 10; $j++) {
-        $valarray = array();
+        $valArray = array();
         foreach ($data[$j] as $key => $val) {
             $values = array();
             $values[] = new Value($val[0], 'int');
@@ -106,9 +106,9 @@ for ($i = 0; $i < $num_tests; $i++) {
             $values[] = new Value($val[7], 'string');
             $values[] = new Value($val[8], 'boolean');
             $values[] = new Value($val[9], 'dateTime.iso8601');
-            $valarray[$key] = new Value($values, 'array');
+            $valArray[$key] = new Value($values, 'array');
         }
-        $vals[] = new Value($valarray, 'struct');
+        $vals[] = new Value($valArray, 'struct');
     }
     $value = new Value($vals, 'array');
     $out = $value->serialize();
@@ -223,7 +223,7 @@ if (!$xd) {
 
     // do not interfere with http compression
     $c->setAcceptedCompression(false);
-    //$c->debug = 1;
+    //$c->setDebug(1);
 
     $testName = "Repeated send (small array) to $srv";
 
@@ -236,7 +236,7 @@ if (!$xd) {
     end_test($testName, 'http 10', $response);
 
     if (function_exists('curl_init')) {
-        $c->keepalive = false;
+        $c->setOption(Client::OPT_KEEPALIVE, false);
         begin_test($testName, 'http 11 no keepalive');
         $response = array();
         for ($i = 0; $i < $num_tests; $i++) {
@@ -264,8 +264,8 @@ if (!$xd) {
     end_test($testName, 'multicall', $response);
 
     if (function_exists('gzinflate')) {
-        $c->accepted_compression = array('gzip');
-        $c->request_compression = 'gzip';
+        $c->setOption(Client::OPT_ACCEPTED_COMPRESSION, array('gzip'));
+        $c->setOption(Client::OPT_REQUEST_COMPRESSION, 'gzip');
 
         begin_test($testName, 'http 10 w. compression');
         $response = array();
@@ -276,7 +276,7 @@ if (!$xd) {
         end_test($testName, 'http 10 w. compression', $response);
 
         if (function_exists('curl_init')) {
-            $c->keepalive = false;
+            $c->setOption(Client::OPT_KEEPALIVE, false);
             begin_test($testName, 'http 11 w. compression and no keepalive');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
@@ -285,7 +285,7 @@ if (!$xd) {
             }
             end_test($testName, 'http 11 w. compression and no keepalive', $response);
 
-            $c->keepalive = true;
+            $c->setOption(Client::OPT_KEEPALIVE, true);
             begin_test($testName, 'http 11 w. keep-alive and compression');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
@@ -316,16 +316,16 @@ if (!$xd) {
             $srv = 'https://' . $args['HTTPSSERVER'] . $args['HTTPSURI'];
             $c = new Client($args['HTTPSURI'], $args['HTTPSSERVER'], 443, 'https');
         }
-        $c->setSSLVerifyPeer(!$args['HTTPSIGNOREPEER']);
-        $c->setSSLVerifyHost($args['HTTPSVERIFYHOST']);
+        $c->setOption(Client::OPT_VERIFY_PEER, !$args['HTTPSIGNOREPEER']);
+        $c->setOption(Client::OPT_VERIFY_HOST, $args['HTTPSVERIFYHOST']);
         // do not interfere with http compression
-        $c->setAcceptedCompression(false);
+        $c->setOption(Client::OPT_ACCEPTED_COMPRESSION, false);
         //$c->debug = 1;
 
         $testName = "Repeated send (small array) to $srv";
 
+        $c->setOption(Client::OPT_KEEPALIVE, false);
         begin_test($testName, 'https no keep-alive');
-        $c->keepalive = false;
         $response = array();
         for ($i = 0; $i < $num_tests; $i++) {
             $resp = $c->send($req);
@@ -333,8 +333,8 @@ if (!$xd) {
         }
         end_test($testName, 'https no keep-alive', $response);
 
+        $c->setOption(Client::OPT_KEEPALIVE, true);
         begin_test($testName, 'https w. keep-alive');
-        $c->keepalive = true;
         $response = array();
         for ($i = 0; $i < $num_tests; $i++) {
             $resp = $c->send($req, 10);
@@ -351,10 +351,10 @@ if (!$xd) {
         end_test($testName, 'https multicall', $response);
 
         if (function_exists('gzinflate')) {
-            $c->accepted_compression = array('gzip');
-            $c->request_compression = 'gzip';
+            $c->setOption(Client::OPT_ACCEPTED_COMPRESSION, array('gzip'));
+            $c->setOption(Client::OPT_REQUEST_COMPRESSION, 'gzip');
 
-            $c->keepalive = false;
+            $c->setOption(Client::OPT_KEEPALIVE, false);
             begin_test($testName, 'https w. compression and no keepalive');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
@@ -363,7 +363,7 @@ if (!$xd) {
             }
             end_test($testName, 'https w. compression and no keepalive', $response);
 
-            $c->keepalive = true;
+            $c->setOption(Client::OPT_KEEPALIVE, true);
             begin_test($testName, 'https w. keep-alive and compression');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
@@ -394,16 +394,16 @@ if (!$xd) {
             $srv = 'https://' . $args['HTTPSSERVER'] . $args['HTTPSURI'];
             $c = new Client($args['HTTPSURI'], $args['HTTPSSERVER'], 443, 'h2');
         }
-        $c->setSSLVerifyPeer(!$args['HTTPSIGNOREPEER']);
-        $c->setSSLVerifyHost($args['HTTPSVERIFYHOST']);
+        $c->setOption(Client::OPT_VERIFY_PEER, !$args['HTTPSIGNOREPEER']);
+        $c->setOption(Client::OPT_VERIFY_HOST, $args['HTTPSVERIFYHOST']);
         // do not interfere with http compression
-        $c->setAcceptedCompression(false);
-        //$c->debug = 1;
+        $c->setOption(Client::OPT_ACCEPTED_COMPRESSION, false);
+        //$c->setDebug(1);
 
         $testName = "Repeated send (small array) to $srv - HTTP/2";
 
+        $c->setOption(Client::OPT_KEEPALIVE, false);
         begin_test($testName, 'http2 no keep-alive');
-        $c->keepalive = false;
         $response = array();
         for ($i = 0; $i < $num_tests; $i++) {
             $resp = $c->send($req);
@@ -411,8 +411,8 @@ if (!$xd) {
         }
         end_test($testName, 'http2 no keep-alive', $response);
 
+        $c->setOption(Client::OPT_KEEPALIVE, true);
         begin_test($testName, 'http2 w. keep-alive');
-        $c->keepalive = true;
         $response = array();
         for ($i = 0; $i < $num_tests; $i++) {
             $resp = $c->send($req, 10);
@@ -429,10 +429,10 @@ if (!$xd) {
         end_test($testName, 'http2 multicall', $response);
 
         if (function_exists('gzinflate')) {
-            $c->accepted_compression = array('gzip');
-            $c->request_compression = 'gzip';
+            $c->setOption(Client::OPT_ACCEPTED_COMPRESSION, array('gzip'));
+            $c->setOption(Client::OPT_REQUEST_COMPRESSION, 'gzip');
 
-            $c->keepalive = false;
+            $c->setOption(Client::OPT_KEEPALIVE, false);
             begin_test($testName, 'http2 w. compression and no keepalive');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
@@ -441,7 +441,7 @@ if (!$xd) {
             }
             end_test($testName, 'http2 w. compression and no keepalive', $response);
 
-            $c->keepalive = true;
+            $c->setOption(Client::OPT_KEEPALIVE, true);
             begin_test($testName, 'http2 w. keep-alive and compression');
             $response = array();
             for ($i = 0; $i < $num_tests; $i++) {
index ffff037..2286c49 100644 (file)
@@ -105,6 +105,7 @@ class HTTPTest extends ServerTest
             return;
         }
 
+        /// @todo replace with setOption when dropping the BC layer
         $this->client->setUseCurl(\PhpXmlRpc\Client::USE_CURL_ALWAYS);
         $this->client->setCurlOptions(array(CURLOPT_FOLLOWLOCATION => true, CURLOPT_POSTREDIR => 3));
 
@@ -286,6 +287,7 @@ class HTTPTest extends ServerTest
         $this->method = 'https';
         $this->client->method = 'https';
         $this->client->path = $this->args['HTTPSURI'];
+        /// @todo replace with setOptions when dropping the BC layer
         $this->client->setSSLVerifyPeer(!$this->args['HTTPSIGNOREPEER']);
         $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST']);
         $this->client->setSSLVersion($this->args['SSLVERSION']);
@@ -327,6 +329,7 @@ class HTTPTest extends ServerTest
         $this->method = 'https';
         $this->client->method = 'https';
         $this->client->path = $this->args['HTTPSURI'];
+        /// @todo replace with setOptions when dropping the BC layer
         $this->client->setSSLVerifyPeer(!$this->args['HTTPSIGNOREPEER']);
         $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST']);
         $this->client->setSSLVersion($this->args['SSLVERSION']);
@@ -364,11 +367,12 @@ class HTTPTest extends ServerTest
             return;
         }
 
-        $this->client->server = $this->args['HTTPSSERVER'];
         $this->method = 'https';
         $this->client->method = 'https';
-        $this->client->setProxy($this->args['PROXYSERVER'], $this->args['PROXYPORT']);
+        $this->client->server = $this->args['HTTPSSERVER'];
         $this->client->path = $this->args['HTTPSURI'];
+        /// @todo replace with setOptions when dropping the BC layer
+        $this->client->setProxy($this->args['PROXYSERVER'], $this->args['PROXYPORT']);
         $this->client->setSSLVerifyPeer(!$this->args['HTTPSIGNOREPEER']);
         $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST']);
         $this->client->setSSLVersion($this->args['SSLVERSION']);
@@ -421,10 +425,11 @@ class HTTPTest extends ServerTest
             return;
         }
 
-        $this->client->server = $this->args['HTTPSSERVER'];
         $this->method = 'h2';
         $this->client->method = 'h2';
+        $this->client->server = $this->args['HTTPSSERVER'];
         $this->client->path = $this->args['HTTPSURI'];
+        /// @todo replace with setOptions when dropping the BC layer
         $this->client->setSSLVerifyPeer(!$this->args['HTTPSIGNOREPEER']);
         $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST']);
         $this->client->setSSLVersion($this->args['SSLVERSION']);