]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/helper/ApplicationUtils.php
curl usage: support HTTP/2 response code header
[github/shaarli/Shaarli.git] / application / helper / ApplicationUtils.php
index a6c03aaeae899daebb46bb37884dc3422694b6d0..f79998b51f54dcf68014db1c80b307d2919137df 100644 (file)
@@ -37,7 +37,7 @@ class ApplicationUtils
     {
         list($headers, $data) = get_http_response($url, $timeout);
 
-        if (strpos($headers[0], '200 OK') === false) {
+        if (preg_match('#HTTP/[\d\.]+ 200(?: OK)?#', $headers[0]) !== 1) {
             error_log('Failed to retrieve ' . $url);
             return false;
         }