#10762: Gzip Middleware Should Compress 201 (Created) Responses
--------------------------------------+-------------------------------------
 Reporter:  rwag...@physics.ucsd.edu  |       Owner:  nobody    
   Status:  new                       |   Milestone:            
Component:  HTTP handling             |     Version:  SVN       
 Keywords:  middleware gzip           |       Stage:  Unreviewed
Has_patch:  1                         |  
--------------------------------------+-------------------------------------
 Hi,

 RESTful web services that use POST for creation of resources often respond
 with a representation of the newly created resource, which can be lengthy.
 However, the appropriate status code is 201, which the Gzip middleware
 ignores. There's a trivial patch attached that contains these lines:

 {{{
 -        if response.status_code != 200 or len(response.content) < 200:
 +        if response.status_code not in (200, 201) or
 len(response.content) < 200:
 }}}

 This is not a particularly big deal, just a convenience.

 Thanks,
 Rick

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10762>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to