From 6cd5e13f24c9e91fed06137f5b524a6abe7a7598 Mon Sep 17 00:00:00 2001 From: zhanxw Date: Thu, 24 Mar 2022 00:01:01 -0500 Subject: [PATCH] Update browse.php Add HTTP/2 support e.g. "HTTP/2 200" will break the original code --- browse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browse.php b/browse.php index ca3f092..663235b 100644 --- a/browse.php +++ b/browse.php @@ -904,7 +904,7 @@ public function readHeader($handle, $header) { # Extract the status code (can occur more than once if 100 continue) if ( $this->status == 0 || ( $this->status == 100 && ! strpos($header, ':') ) ) { - $this->status = substr($header, 9, 3); + $this->status = explode(" ", $header)[1]; } # Attempt to extract header name and value