fix tests for libcurl >= 7.48
[m6w6/ext-http] / tests / helper / proxy.inc
index f99dd97cf735575c0cbd7857d0ab77bae9ead7b6..61a68bd05d909925a00d90e26baeffabb9c873f6 100644 (file)
@@ -7,7 +7,9 @@ serve(function($client) {
        /* this might be a proxy connect or a standard request */
        $request = new http\Message($client, false);
        
-       if ($request->getHeader("Proxy-Connection")) {
+       /* libcurl >= 7.48 does not send Proxy-Connection anymore */
+       if ($request->getHeader("Proxy-Connection")
+       ||      $request->getRequestMethod() === "CONNECT") {
                $response = new http\Env\Response;
                $response->setEnvRequest($request);
                $response->send($client);