              if self.CONTENTTYPE_PARAM and request.POST.get(self.CONTENTTYPE_PARAM, None):
                  content_type = request.POST.get(self.CONTENTTYPE_PARAM, None)
  
              return (content_type, request.POST[self.CONTENT_PARAM])
          elif request.method == 'PUT':
              f = SocketFile(request.environ['wsgi.input'], request.META['CONTENT_LENGTH'])
              return (content_type, f.read())
          else:
              return (content_type, request.raw_post_data)
 
</s> remove             # Set content type if form contains a none empty FORM_PARAM_CONTENTTYPE field
 </s> add             # Set content type if form contains a non-empty CONTENTTYPE_PARAM field </s> remove from django.core.files.base import File
class SocketFile(File):
    # Only forward access is allowed
    def __init__(self, socket, size):
        super(SocketFile, self).__init__(socket)
        self._size = int(size)
        self._pos = 0

    def read(self, num_bytes=None):
        if num_bytes is None:
            num_bytes = self._size - self._pos
        else:
            num_bytes = min(num_bytes, self._size - self._pos)
        self._pos += num_bytes
        return self.file.read(num_bytes)

    def tell(self):
        return self._pos

    def seek(self, position):
        pass
 </s> add  </s> remove         """If the request contains content return a tuple of (content_type, content) otherwise return None.
 </s> add         """If the request contains content, returns a tuple of (content_type, content) otherwise returns None. </s> remove         request = self.resource.request

        if request.method == 'PUT':
            data = parse_qs(input)
        elif request.method == 'POST':
            # Django has already done the form parsing for us.
            data = dict(request.POST.iterlists())
 </s> add         data = parse_qs(input) </s> remove         if request.method == 'PUT':
            upload_handlers = request._get_upload_handlers()
            django_mpp = DjangoMPParser(request.META, StringIO(input), upload_handlers)
            data, files = django_mpp.parse()
        elif request.method == 'POST':
            # Django has already done the form parsing for us.
            data = request.POST
            files = request.FILES
 </s> add         upload_handlers = request._get_upload_handlers()
        django_mpp = DjangoMPParser(request.META, StringIO(input), upload_handlers)
        data, files = django_mpp.parse()
              if self.CONTENTTYPE_PARAM and request.POST.get(self.CONTENTTYPE_PARAM, None):
                  content_type = request.POST.get(self.CONTENTTYPE_PARAM, None)
  
              return (content_type, request.POST[self.CONTENT_PARAM])



          else:
              return (content_type, request.raw_post_data)
keep keep keep keep replace replace replace keep keep
 removed useless stuff, request.POST and FILES not used + some doc 
djangorestframework/content.py