Skip to content
Browse files

Use .gzip as extension for pre-gzipped files.

Some versions of Safari are stupid about files with
.gz suffix.
  • Loading branch information...
1 parent ffb62ff commit 1ca4d56b985ac5fdf05d8f3572873477c204a0a0 @spladug spladug committed Nov 25, 2011
Showing with 6 additions and 6 deletions.
  1. +2 −2 .gitignore
  2. +2 −2 r2/Makefile
  3. +2 −2 r2/r2/lib/template_helpers.py
View
4 .gitignore
@@ -33,8 +33,8 @@ r2/myproduction.ini
.DS_Store
r2/r2.egg-info/**
r2/r2/public/static/sprite*.png
-r2/r2/public/static/*.gz
-r2/r2/public/static/js/lib/*.gz
+r2/r2/public/static/*.gzip
+r2/r2/public/static/js/lib/*.gzip
r2/r2/lib/_normalized_hot.c
r2/r2/lib/mr_tools/_mr_tools.c
r2/r2/lib/db/_sorts.c
View
4 r2/Makefile
@@ -167,13 +167,13 @@ clean_names:
#### gzip!
GZIPPABLE := $(filter %.css %.js,$(MANGLED_FILES) $(STATIC_DIR)/js/lib/jquery.js)
-GZIPPED := $(addsuffix .gz,$(GZIPPABLE))
+GZIPPED := $(addsuffix .gzip,$(GZIPPABLE))
.PHONY: clean_gzip
gzip: $(GZIPPED)
-$(GZIPPED): %.gz: %
+$(GZIPPED): %.gzip: %
gzip -c $< > $@
clean_gzip:
View
4 r2/r2/lib/template_helpers.py
@@ -81,12 +81,12 @@ def static(path, allow_gzip=True):
scheme = 'http'
domain = g.static_domain
query = None
- suffix = '.gz' if should_gzip and g.static_pre_gzipped else ''
+ suffix = '.gzip' if should_gzip and g.static_pre_gzipped else ''
elif c.secure and g.static_secure_domain:
scheme = 'https'
domain = g.static_secure_domain
query = None
- suffix = '.gz' if should_gzip and g.static_secure_pre_gzipped else ''
+ suffix = '.gzip' if should_gzip and g.static_secure_pre_gzipped else ''
else:
path_components.append(c.site.static_path)
query = None

0 comments on commit 1ca4d56

Please sign in to comment.
Something went wrong with that request. Please try again.