Example #1
0
    def do_PROPFIND(self):

        dc=self.IFACE_CLASS

        # read the body
        body=None
        if self.headers.has_key("Content-Length"):
            l=self.headers['Content-Length']
            body=self.rfile.read(atoi(l))
        self.write_infp(body)

        # which Depth?
        if self.headers.has_key('Depth'):
            d=self.headers['Depth']
        else:
            d="infinity"

        uri=urlparse.urljoin(dc.baseuri,self.path)
        uri=urllib.unquote(uri)
        pf=PROPFIND(uri,dc,d)

        if body:    
            pf.read_propfind(body)


        try:
            DATA=pf.createResponse()
            DATA=DATA+"\n"
        except DAV_Error, (ec,dd):
            return self.send_status(ec)
Example #2
0
    def do_PROPFIND(self):
        """ Retrieve properties on defined resource. """

        dc = self.IFACE_CLASS

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

        uri = urlparse.urljoin(self.get_baseuri(dc), self.path)
        uri = urllib.unquote(uri)

        try:
            pf = PROPFIND(uri, dc, self.headers.get('Depth', 'infinity'), body)
        except ExpatError:
            # parse error
            return self.send_status(400)

        try:
            DATA = '%s\n' % pf.createResponse()
        except DAV_Error, (ec, dd):
            return self.send_status(ec)
Example #3
0
    def do_PROPFIND(self):

        dc = self.IFACE_CLASS
        # read the body
        body = None
        if self.headers.has_key("Content-Length"):
            l = self.headers['Content-Length']
            body = self.rfile.read(atoi(l))
        self.write_infp(body)

        # which Depth?
        if self.headers.has_key('Depth'):
            d = self.headers['Depth']
        else:
            d = "infinity"

        uri = urlparse.urljoin(dc.BASEURI, self.path)
        uri = urllib.unquote(uri)
        pf = PROPFIND(uri, dc, d)

        if body:
            pf.read_propfind(body)

        try:
            DATA = pf.createResponse()
            DATA = DATA + "\n"
        except DAV_Error, (ec, dd):
            return self.send_status(ec)
Example #4
0
    def do_PROPFIND(self):
        """ Retrieve properties on defined resource. """

        dc = self.IFACE_CLASS

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

        uri = urlparse.urljoin(self.get_baseuri(dc), self.path)
        uri = urllib.unquote(uri)

        try:
            pf = PROPFIND(uri, dc, self.headers.get('Depth', 'infinity'), body)
        except ExpatError:
            # parse error
            return self.send_status(400)

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

        dc=self.IFACE_CLASS
        # read the body
        body=None
        if self.headers.has_key("Content-Length"):
            l=self.headers['Content-Length']
            body=self.rfile.read(atoi(l))
        body = """<?xml version="1.0" encoding="utf-8"?>
                    <propfind xmlns="DAV:"><prop>
                    <getcontentlength xmlns="DAV:"/>
                    <getlastmodified xmlns="DAV:"/>
                    <getcreationdate xmlns="DAV:"/>
                    <checked-in xmlns="DAV:"/>
                    <executable xmlns="http://apache.org/dav/props/"/>
                    <displayname xmlns="DAV:"/>
                    <resourcetype xmlns="DAV:"/>
                    <checked-out xmlns="DAV:"/>
                    </prop></propfind>"""
        self.write_infp(body)

        # which Depth?
        if self.headers.has_key('Depth'):
            d=self.headers['Depth']
        else:
            d="infinity"

        uri=urlparse.urljoin(dc.baseuri,self.path)
        uri=urllib.unquote(uri)
        pf=PROPFIND(uri,dc,d)

        if body:
            pf.read_propfind(body)

        try:
            DATA=pf.createResponse()
            DATA=DATA+"\n"
        except DAV_Error, (ec,dd):
            return self.send_status(ec)
Example #6
0
    def do_PROPFIND(self):

        dc = self.IFACE_CLASS
        # read the body
        body = None
        if self.headers.has_key("Content-Length"):
            l = self.headers['Content-Length']
            body = self.rfile.read(atoi(l))
        body = """<?xml version="1.0" encoding="utf-8"?>
                    <propfind xmlns="DAV:"><prop>
                    <getcontentlength xmlns="DAV:"/>
                    <getlastmodified xmlns="DAV:"/>
                    <getcreationdate xmlns="DAV:"/>
                    <checked-in xmlns="DAV:"/>
                    <executable xmlns="http://apache.org/dav/props/"/>
                    <displayname xmlns="DAV:"/>
                    <resourcetype xmlns="DAV:"/>
                    <checked-out xmlns="DAV:"/>
                    </prop></propfind>"""
        self.write_infp(body)

        # which Depth?
        if self.headers.has_key('Depth'):
            d = self.headers['Depth']
        else:
            d = "infinity"

        uri = urlparse.urljoin(dc.baseuri, self.path)
        uri = urllib.unquote(uri)
        pf = PROPFIND(uri, dc, d)

        if body:
            pf.read_propfind(body)

        try:
            DATA = pf.createResponse()
            DATA = DATA + "\n"
        except DAV_Error, (ec, dd):
            return self.send_status(ec)
Example #7
0
    def __init__(self, uri, dataclass, depth, body):
        PROPFIND.__init__(self, uri, dataclass, depth, body)

        doc = minidom.parseString(body)

        self.filter = doc.documentElement
Example #8
0
    def __init__(self, uri, dataclass, depth, body):
        PROPFIND.__init__(self, uri, dataclass, depth, body)

        doc = minidom.parseString(body)

        self.filter = doc.documentElement