parameters: (self, REQUEST, RESPONSE)
return_statement: return RESPONSE
docstring: Handle HTTP (and presumably FTP?) PUT requests
docstring_summary: Handle HTTP (and presumably FTP?) PUT requests
docstring_tokens: Handle HTTP ( and presumably FTP? ) PUT requests
function: def PUT(self, REQUEST, RESPONSE):
      """ Handle HTTP (and presumably FTP?) PUT requests """
      self.dav__init(REQUEST, RESPONSE)
      self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
      if REQUEST.environ['REQUEST_METHOD'] != 'PUT':
        raise Forbidden('REQUEST_METHOD should be PUT.')
      body = REQUEST.get('BODY', '')
  
      try:
        headers = self.parseHeadersFromText(body)
        content_type = REQUEST.get_header('Content-Type', '')
        headers.setdefault('content_type', content_type)
        headers['file'] = StringIO(body)
        self._edit(**headers)
      except ResourceLockedError:
        transaction.abort()
        RESPONSE.setStatus(423)
        return RESPONSE
  
      RESPONSE.setStatus(204)
      self.reindexObject()
      return RESPONSE
function_tokens: def PUT ( self , REQUEST , RESPONSE ) : self . dav__init ( REQUEST , RESPONSE ) self . dav__simpleifhandler ( REQUEST , RESPONSE , refresh = 1 ) if REQUEST . environ [ 'REQUEST_METHOD' ] != 'PUT' : raise Forbidden ( 'REQUEST_METHOD should be PUT.' ) body = REQUEST . get ( 'BODY' , '' ) try : headers = self . parseHeadersFromText ( body ) content_type = REQUEST . get_header ( 'Content-Type' , '' ) headers . setdefault ( 'content_type' , content_type ) headers [ 'file' ] = StringIO ( body ) self . _edit ( * * headers ) except ResourceLockedError : transaction . abort ( ) RESPONSE . setStatus ( 423 ) return RESPONSE RESPONSE . setStatus ( 204 ) self . reindexObject ( ) return RESPONSE