From 6e6092596b9cb11fb019071b805caff88afedf06 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 19 May 2010 11:25:07 +0200 Subject: [PATCH] [HttpKernel] added a method to retrieved the ETags from the IF_NONE_MATCH header in a Request --- src/Symfony/Components/HttpKernel/Request.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Components/HttpKernel/Request.php b/src/Symfony/Components/HttpKernel/Request.php index 178df2b35e..e4179e6bd1 100644 --- a/src/Symfony/Components/HttpKernel/Request.php +++ b/src/Symfony/Components/HttpKernel/Request.php @@ -460,6 +460,11 @@ class Request return in_array(strtolower($this->getMethod()), array('get', 'head')); } + public function getETags() + { + return preg_split('/\s*,\s*/', $this->headers->get('if_none_match')); + } + public function isNoCache() { return $this->headers->getCacheControl()->isNoCache() || 'no-cache' == $this->headers->get('Pragma');