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)
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)