  
          # Munge DELETE Response code to allow us to return content
          # (Do this *after* we've rendered the template so that we include
          # the normal deletion response code in the output)
          if self.view.response.status == 204:
              self.view.response.status = 200
  
          return ret
  
  
  class DocumentingHTMLRenderer(DocumentingTemplateRenderer):
 
</s> remove 
        # Always add these headers.
        response.headers['Allow'] = ', '.join(self.allowed_methods)
        # sample to allow caching using Vary http header
        response.headers['Vary'] = 'Authenticate, Accept'

        # merge with headers possibly set at some point in the view
        response.headers.update(self.headers)
        return self.render(response)

    def add_header(self, field, value):
        """
        Add *field* and *value* to the :attr:`headers` attribute of the :class:`View` class.
        """
        self.headers[field] = value
 </s> add         return response </s> remove         Hook for any code that needs to run prior to anything else.
 </s> add         Returns an `HttpRequest`. This method is a hook for any code that needs to run
        prior to anything else. </s> remove         Hook for any code that needs to run after everything else in the view.
 </s> add         Returns an `HttpResponse`. This method is a hook for any code that needs to run
        after everything else in the view. </s> remove # Right now we expect this test to fail - I'm just going to leave it commented out.
# Looking forward to actually being able to raise ExpectedFailure sometime!
#
#from django.test import TestCase
#from djangorestframework.response import Response
#
#
#class TestResponse(TestCase):
#
#    # Interface tests
#
#    # This is mainly to remind myself that the Response interface needs to change slightly
#    def test_response_interface(self):
#        """Ensure the Response interface is as expected."""
#        response = Response()
#        getattr(response, 'status')
#        getattr(response, 'content')
#        getattr(response, 'headers')
 </s> add import json </s> remove     def __init__(self, status=200, content=None, headers=None):
        self.status = status
        self.media_type = None
 </s> add     _ACCEPT_QUERY_PARAM = '_accept'        # Allow override of Accept header in URL query params
    _IGNORE_IE_ACCEPT_HEADER = True

    def __init__(self, content=None, status=None, request=None, renderers=None):
        """
        content is the raw content.

        The set of renderers that the response can handle.

        Should be a tuple/list of classes as described in the :mod:`renderers` module.
        """
        # First argument taken by `SimpleTemplateResponse.__init__` is template_name,
        # which we don't need
        super(Response, self).__init__(None, status=status)
        # We need to store our content in raw content to avoid overriding HttpResponse's
        # `content` property
        self.raw_content = content 
        if self.view.response.status_code == 204:
            self.view.response.status_code = 200
  
          # Munge DELETE Response code to allow us to return content
          # (Do this *after* we've rendered the template so that we include
          # the normal deletion response code in the output)
        if self.view.response.status_code == 204:
            self.view.response.status_code = 200
        if self.view.response.status_code == 204:
            self.view.response.status_code = 200
  
          return ret
  
  
  class DocumentingHTMLRenderer(DocumentingTemplateRenderer):
keep keep keep keep replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/renderers.py