HTTP/2 failures
Hello! Seems there is a problem with HTTP/2 request. The pattern in the preg regex isn't able to detect the new HTTP/2 response. Maybe the pattern needs to be updated or a check for which version was sent to check the response.
I also experienced the same thing.
Hello! Seems there is a problem with HTTP/2 request. The pattern in the preg regex isn't able to detect the new HTTP/2 response. Maybe the pattern needs to be updated or a check for which version was sent to check the response.
@InteliClic I tried to solve it by adding a little code to the Curl Response library file to curl_response.php
add this code on curl_response.php
$response = str_replace("HTTP/2", "HTTP/2.0", $response);
after
$pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
Like this
$pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
// Hack Lib with replace for http/2 response
$response = str_replace("HTTP/2", "HTTP/2.0", $response);
// Extract headers from response
preg_match_all($pattern, $response, $matches);
I hope it can help you without having to make many changes to change the library in your code.