Django

Code

Changeset 6548

Show
Ignore:
Timestamp:
10/20/07 01:50:16 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4969 -- Changed content retrieval in HttpResponse to be more robust in
the presence of an existing content encoding. Fixes some sporadic failures with
the GzipMiddleware?, for example. Thanks, Johann Queuniet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/__init__.py

    r6546 r6548  
    318318 
    319319    def _get_content(self): 
    320         content = smart_str(''.join(self._container), self._charset) 
    321         return content 
     320        if self.has_header('Content-Encoding'): 
     321            return ''.join(self._container) 
     322        return smart_str(''.join(self._container), self._charset) 
    322323 
    323324    def _set_content(self, value):