          if not request.META.get('CONTENT_LENGTH', None) and not request.META.get('TRANSFER_ENCODING', None):
              return None
          return (request.META.get('CONTENT_TYPE', None), request.raw_post_data)
  
  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
  
  class OverloadedContentMixin(ContentMixin):
      """HTTP request content behaviour that also allows arbitrary content to be tunneled in form data."""
      
      #TODO: test PUT
 
</s> remove     
    #TODO: test PUT
    #TODO: rewrite cleaner
 </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         elif request.method == 'PUT':
            f = SocketFile(request.environ['wsgi.input'], request.META['CONTENT_LENGTH'])
            return (content_type, f.read())
 </s> add  </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     """The name to use for the content-type override field in the POST form."""
 </s> add     """The name to use for the content-type override field in the POST form. Taken into account only if content overloading is activated."""
          if not request.META.get('CONTENT_LENGTH', None) and not request.META.get('TRANSFER_ENCODING', None):
              return None
          return (request.META.get('CONTENT_TYPE', None), request.raw_post_data)
  





















  
  class OverloadedContentMixin(ContentMixin):
      """HTTP request content behaviour that also allows arbitrary content to be tunneled in form data."""
      
      #TODO: test PUT
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 removed useless stuff, request.POST and FILES not used + some doc 
djangorestframework/content.py