New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flask Debug Toolbar Does Not Check For A Compressed Response #83
Comments
Can you try flipping the order that you add the extensions to your app? This should make the compression step happen after applying the toolbar. |
Same problem with either Flask-Compress and manual gzip (recipe from http://flask.pocoo.org/snippets/122/). How can I reorder applying it? |
Swapping the lines of code where you add the toolbar and add the compress extension should swap the order that they're executed. I think the "after_request" functions are processed in reverse order, so Flask-Compress should be the first extension initialized so that it's the last one called. |
Actually, I think the we could throw a more useful error message here... suggest to the user that if they're compressing to swap extension ordering. |
Fixed in #154. |
If you have an extension like Flask Compress compressing the contents of your responses with gzip before it's sent back to the user, flask debug toolbar will throw an error because it assumes the response is UTF-8 HTML.
The text was updated successfully, but these errors were encountered: