Skip to content

Commit

Permalink
re #1801: Reimplement enable_http_compression to replace skin script.
Browse files Browse the repository at this point in the history
Actually, it might be possible to delete the enable_compression method
entirely, it doesn't seem to be used by Plone. I'm just not sure whether
3rd-party code might rely on it even though I think it's unlikely.
  • Loading branch information
tlotze committed Oct 3, 2018
1 parent d41c529 commit 778aa48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ New features:
- Add test for Revert to Revision action in History Viewlet
[davilima6]

- Reimplement enable_http_compression to replace skin script. #1801
[tlotze]

Bug fixes:

- Show document byline for logged-in users. Fixes #160
Expand Down
2 changes: 1 addition & 1 deletion plone/app/layout/viewlets/httpheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HTTPCachingHeaders(HeaderViewlet):

def enable_compression(self):
"""Call to activate gzip"""
self.context.enableHTTPCompression(request=self.request, enable=1)
self.request.RESPONSE.enableHTTPCompression(REQUEST=self.request)

def getHeaders(self):
lang = getattr(self.context, 'Language', None)
Expand Down

0 comments on commit 778aa48

Please sign in to comment.