#10762: Gzip Middleware Should Compress 201 (Created) Responses ----------------------------------------------------+----------------------- Reporter: rwagner@… | Owner: nobody Status: new | Milestone: Component: HTTP handling | Version: SVN Resolution: | Keywords: middleware gzip Triage Stage: Design decision needed | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | ----------------------------------------------------+-----------------------
Comment (by aaugustin): The comment in `gzip.py` say: "It's not worth compressing non-OK or really short responses." If non-OK responses are not worth compressing because they are expected to be short, testing their length is enough, which means the check on `response.status_code` should be removed. If there is another reason why non-OK responses should not be compressed, the proper check is `200 <= response.status_code < 300`, and the reason should be explained in a comment. -- Ticket URL: <http://code.djangoproject.com/ticket/10762#comment:4> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.