Exemple #1
0
    def do_PROPFIND(self):
        """Answer to PROPFIND with generic data.

        A rough copy of python-webdav's do_PROPFIND, but hacked to work
        statically.
        """

        dc = dummy_dav_interface(self)

        # read the body containing the xml request
        # iff there is no body then this is an ALLPROP request
        body = None
        if self.headers.has_key('Content-Length'):
            l = self.headers['Content-Length']
            body = self.rfile.read(atoi(l))

        path = self.path.rstrip('/')
        uri = urllib.unquote(path)

        pf = PROPFIND(uri, dc, self.headers.get('Depth', 'infinity'), body)

        try:
            DATA = '%s\n' % pf.createResponse()
        except DAV_Error, (ec, dd):
            return self.send_error(ec, dd)
    def do_PROPFIND(self):
        """Answer to PROPFIND with generic data.

        A rough copy of python-webdav's do_PROPFIND, but hacked to work
        statically.
        """

        dc = dummy_dav_interface(self)

        # read the body containing the xml request
        # iff there is no body then this is an ALLPROP request
        body = None
        if self.headers.has_key('Content-Length'):
            l = self.headers['Content-Length']
            body = self.rfile.read(atoi(l))

        path = self.path.rstrip('/')
        uri = urllib.unquote(path)

        pf = PROPFIND(uri, dc, self.headers.get('Depth', 'infinity'), body)

        try:
            DATA = '%s\n' % pf.createResponse()
        except DAV_Error, (ec,dd):
            return self.send_error(ec,dd)