From f12caf930eb375ef60b741265fb331da4d615504 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 1 Sep 2015 10:40:44 +0200 Subject: Properly return 304 The ETag set in the IF_NONE_MODIFIED header is wraped in quotes ("). However the ETag that is set in response is not (yet). Also we need to cast the ETag to a string. * Added unit test --- lib/private/appframework/http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/appframework/http.php b/lib/private/appframework/http.php index e7b0d1e2cab..dee9818f4bc 100644 --- a/lib/private/appframework/http.php +++ b/lib/private/appframework/http.php @@ -121,7 +121,7 @@ class Http extends BaseHttp { // if etag or lastmodified have not changed, return a not modified if ((isset($this->server['HTTP_IF_NONE_MATCH']) - && trim($this->server['HTTP_IF_NONE_MATCH']) === $ETag) + && trim(trim($this->server['HTTP_IF_NONE_MATCH']), '"') === (string)$ETag) || -- cgit v1.2.3