From dc8266db597c5b5e88a3ea5a8dbec00d20abe60a Mon Sep 17 00:00:00 2001 From: Athlon1600 Date: Tue, 31 Dec 2019 14:33:41 -0600 Subject: [PATCH] match HTTP2 status code too --- src/Proxy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Proxy.php b/src/Proxy.php index 2477789..152b256 100644 --- a/src/Proxy.php +++ b/src/Proxy.php @@ -10,7 +10,7 @@ class Proxy { // Proxy script version - const VERSION = '5.1.0'; + const VERSION = '5.2.0'; private $dispatcher; @@ -35,7 +35,7 @@ private function header_callback($ch, $headers){ // extract status code // if using proxy - we ignore this header: HTTP/1.1 200 Connection established - if(preg_match('/HTTP\/1.\d+ (\d+)/', $headers, $matches) && stripos($headers, '200 Connection established') === false){ + if(preg_match('/HTTP\/[\d.]+\s*(\d+)/', $headers, $matches) && stripos($headers, '200 Connection established') === false){ $this->response->setStatusCode($matches[1]); $this->status_found = true;