Skip to content
Snippets Groups Projects
Commit 9f4e6c65 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #10241: import fix

parent be0e82f2
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# $Id$ # $Id$
from flask import after_this_request, request import flask
from cStringIO import StringIO as IO from cStringIO import StringIO as IO
import gzip import gzip
import functools import functools
...@@ -27,9 +27,9 @@ import functools ...@@ -27,9 +27,9 @@ import functools
def gzipped(f): def gzipped(f):
@functools.wraps(f) @functools.wraps(f)
def view_func(*args, **kwargs): def view_func(*args, **kwargs):
@after_this_request @flask.after_this_request
def zipper(response): def zipper(response):
accept_encoding = request.headers.get('Accept-Encoding', '') accept_encoding = flask.request.headers.get('Accept-Encoding', '')
if 'gzip' not in accept_encoding.lower(): if 'gzip' not in accept_encoding.lower():
return response return response
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment