Skip to content

Commit dc8266d

Browse files
authored
match HTTP2 status code too
1 parent 7e5c5b9 commit dc8266d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Proxy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Proxy {
1111

1212
// Proxy script version
13-
const VERSION = '5.1.0';
13+
const VERSION = '5.2.0';
1414

1515
private $dispatcher;
1616

@@ -35,7 +35,7 @@ private function header_callback($ch, $headers){
3535

3636
// extract status code
3737
// if using proxy - we ignore this header: HTTP/1.1 200 Connection established
38-
if(preg_match('/HTTP\/1.\d+ (\d+)/', $headers, $matches) && stripos($headers, '200 Connection established') === false){
38+
if(preg_match('/HTTP\/[\d.]+\s*(\d+)/', $headers, $matches) && stripos($headers, '200 Connection established') === false){
3939

4040
$this->response->setStatusCode($matches[1]);
4141
$this->status_found = true;

0 commit comments

Comments
 (0)