aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-19 15:03:18 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-19 15:03:18 +0100
commit6b76ce6f6285fd0b3565fc911f6469d21a132149 (patch)
treec9625e1c001064acd64339c2bf34373c5eb05f41 /application
parentffa39719a17982e6a6cac9bc3f758aa12fa69973 (diff)
downloadShaarli-6b76ce6f6285fd0b3565fc911f6469d21a132149.tar.gz
Shaarli-6b76ce6f6285fd0b3565fc911f6469d21a132149.tar.zst
Shaarli-6b76ce6f6285fd0b3565fc911f6469d21a132149.zip
curl usage: support HTTP/2 response code header
Diffstat (limited to 'application')
-rw-r--r--application/helper/ApplicationUtils.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/helper/ApplicationUtils.php b/application/helper/ApplicationUtils.php
index a6c03aae..f79998b5 100644
--- a/application/helper/ApplicationUtils.php
+++ b/application/helper/ApplicationUtils.php
@@ -37,7 +37,7 @@ class ApplicationUtils
37 { 37 {
38 list($headers, $data) = get_http_response($url, $timeout); 38 list($headers, $data) = get_http_response($url, $timeout);
39 39
40 if (strpos($headers[0], '200 OK') === false) { 40 if (preg_match('#HTTP/[\d\.]+ 200(?: OK)?#', $headers[0]) !== 1) {
41 error_log('Failed to retrieve ' . $url); 41 error_log('Failed to retrieve ' . $url);
42 return false; 42 return false;
43 } 43 }