def process_response(self, request, response):
<EOL>if not settings.DEBUG:<EOL><INDENT>return response<EOL><DEDENT>content_encoding = response.get('<STR_LIT>', '<STR_LIT>')<EOL>content_type = response.get('<STR_LIT:Content-Type>', '<STR_LIT>').split('<STR_LIT:;>')[<NUM_LIT:0>]<EOL>if any((getattr(response, '<STR_LIT>', False),<EOL>'<STR_LIT>' in content_encoding,<EOL>content_type not in _HTML_TYPES)):<EOL><INDENT>return response<EOL><DEDENT>content = force_text(response.content, encoding=settings.DEFAULT_CHARSET)<EOL>pattern = re.escape('<STR_LIT>')<EOL>bits = re.split(pattern, content, flags=re.IGNORECASE)<EOL>if len(bits) > <NUM_LIT:1>:<EOL><INDENT>bits[-<NUM_LIT:2>] += debug_payload(request, response, self.view_data)<EOL>response.content = "<STR_LIT>".join(bits)<EOL>if response.get('<STR_LIT>', None):<EOL><INDENT>response['<STR_LIT>'] = len(response.content)<EOL><DEDENT><DEDENT>return response<EOL>
Let's handle old-style response processing here, as usual.