You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/12/16 23:16:22 UTC

[22/37] git commit: [#6942] Remove redundant etag_cache() call

[#6942] Remove redundant etag_cache() call

Signed-off-by: Tim Van Steenburgh <tv...@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/db/5424
Commit: f26870569d05fb34af8fbcbe4371367998716131
Parents: d6a9e5e
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Fri Dec 13 04:47:55 2013 +0000
Committer: Dave Brondsema <db...@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))