From 47f18dcb44ef52e4b77bbf8eab4d337950b7147c Mon Sep 17 00:00:00 2001 From: Karl Dubost Date: Thu, 9 Feb 2017 13:04:26 +0900 Subject: [PATCH] Issue #609 - Removes etag factory from helpers Fixes also a typo for cache-control. --- webcompat/helpers.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/webcompat/helpers.py b/webcompat/helpers.py index 227e10ba8..4c6ee7bd1 100644 --- a/webcompat/helpers.py +++ b/webcompat/helpers.py @@ -458,18 +458,6 @@ def api_request(method, path, params=None, data=None): abort(404) -def make_etag(content): - '''Given a string creates an etag value.''' - etag = hashlib.md5(content).hexdigest() - return etag - - -def set_etag(response, etag): - '''Adds etag HTTP header to a response.''' - response.headers['Etag'] = etag - return response - - def set_cache_control(response, seconds): '''Adds Cache-Control headers with x seconds. @@ -477,3 +465,4 @@ def set_cache_control(response, seconds): ''' caching_header = 'private, max-age={time}' response.headers['Cache-Control'] = caching_header.format(time=seconds) + return response