incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/9] git commit: [#6942] Remove redundant etag_cache() call
Date Mon, 16 Dec 2013 17:58:58 GMT
[#6942] Remove redundant etag_cache() call

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f2687056
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f2687056
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f2687056

Branch: refs/heads/master
Commit: f26870569d05fb34af8fbcbe4371367998716131
Parents: d6a9e5e
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Fri Dec 13 04:47:55 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Dec 16 17:58:46 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/static.py | 1 -
 Allura/allura/lib/utils.py          | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f2687056/Allura/allura/controllers/static.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/static.py b/Allura/allura/controllers/static.py
index c072b2f..ce04bbe 100644
--- a/Allura/allura/controllers/static.py
+++ b/Allura/allura/controllers/static.py
@@ -48,6 +48,5 @@ class NewForgeController(object):
         """Serve stylesheet containing icon urls for every installed tool.
 
         """
-        etag_cache('tool_icon_css?' + str(g.server_start))
         return utils.serve_file(StringIO(g.tool_icon_css),
                 'tool_icon_css', 'text/css', last_modified=g.server_start)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f2687056/Allura/allura/lib/utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 60097c5..3e92f46 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -481,7 +481,7 @@ def take_while_true(source):
 def serve_file(fp, filename, content_type, last_modified=None, cache_expires=None, size=None,
embed=True):
     '''Sets the response headers and serves as a wsgi iter'''
     if filename and last_modified:
-        etag_cache(u'{0}?{1}'.format(filename, last_modified))
+        etag_cache(u'{0}?{1}'.format(filename, last_modified).encode('utf-8'))
     pylons.response.headers['Content-Type'] = ''
     pylons.response.content_type = content_type.encode('utf-8')
     pylons.response.cache_expires = cache_expires or asint(tg.config.get('files_expires_header_secs',
60 * 60))


Mime
View raw message