From 17171d3db2d1d9a8d21ded20d6267aaed09e1c8a Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Tue, 28 Nov 2023 18:52:50 -0800 Subject: [PATCH] Ensure we are correctly responding to HEAD requests (#1896) --- src/library/Box/UrlHelper.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/library/Box/UrlHelper.php b/src/library/Box/UrlHelper.php index cc509b558..48a3b4aa5 100644 --- a/src/library/Box/UrlHelper.php +++ b/src/library/Box/UrlHelper.php @@ -1,4 +1,5 @@ params[$paramNames[$i]] = $paramValues[$i]; } $this->match = true; @@ -38,7 +46,8 @@ class Box_UrlHelper { } } - private function regexValue($matches) { + private function regexValue($matches) + { $key = str_replace(':', '', $matches[0]); if (array_key_exists($key, $this->conditions)) { return '(' . $this->conditions[$key] . ')'; @@ -46,5 +55,4 @@ class Box_UrlHelper { return '([a-zA-Z0-9_\-]+)'; } } - -} \ No newline at end of file +}