[CalendarServer-changes] [1293]
CalendarServer/branches/users/dreid/new-twisted/lib-patches/Twisted/
twisted.web2.dav.static.patch
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 28 11:23:04 PST 2007
Revision: 1293
http://trac.macosforge.org/projects/calendarserver/changeset/1293
Author: dreid at apple.com
Date: 2007-02-28 11:23:03 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
make dav static patch apply cleanly
Modified Paths:
--------------
CalendarServer/branches/users/dreid/new-twisted/lib-patches/Twisted/twisted.web2.dav.static.patch
Modified: CalendarServer/branches/users/dreid/new-twisted/lib-patches/Twisted/twisted.web2.dav.static.patch
===================================================================
--- CalendarServer/branches/users/dreid/new-twisted/lib-patches/Twisted/twisted.web2.dav.static.patch 2007-02-28 19:06:58 UTC (rev 1292)
+++ CalendarServer/branches/users/dreid/new-twisted/lib-patches/Twisted/twisted.web2.dav.static.patch 2007-02-28 19:23:03 UTC (rev 1293)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/static.py
===================================================================
---- twisted/web2/dav/static.py (revision 18545)
+--- twisted/web2/dav/static.py (revision 19737)
+++ twisted/web2/dav/static.py (working copy)
@@ -28,16 +28,16 @@
@@ -131,71 +131,15 @@
# Workarounds for issues with File
##
-@@ -132,63 +186,11 @@
+@@ -132,7 +186,10 @@
return (self.createSimilarFile(self.fp.child(path).path), segments[1:])
def createSimilarFile(self, path):
- return self.__class__(path, defaultType=self.defaultType, indexNames=self.indexNames[:])
+ return self.__class__(
+ path, self.defaultType, self.indexNames[:],
-+ principalCollections=self.principalCollections()
++ principalCollection=self.principalCollections()
+ )
-- def render(self, request):
-- """
-- This is a direct copy of web2.static.render with the
-- listChildren behavior replaced with findChildren to ensure
-- that the current authenticated principal can only list
-- directory contents that they have read permissions for.
-- """
-- if not self.fp.exists():
-- yield responsecode.NOT_FOUND
-- return
--
-- if self.fp.isdir():
-- if request.uri[-1] != "/":
-- # Redirect to include trailing '/' in URI
-- yield RedirectResponse(
-- request.unparseURL(path=request.path+'/'))
-- return
-- else:
-- ifp = self.fp.childSearchPreauth(*self.indexNames)
-- if ifp:
-- # Render from the index file
-- standin = self.createSimilarFile(ifp.path)
-- else:
-- filtered_aces = waitForDeferred(self.inheritedACEsforChildren(request))
-- yield filtered_aces
-- filtered_aces = filtered_aces.getResult()
--
-- children = []
--
-- def found(request, uri):
-- children.append(uri.split("/")[-1].rstrip("/"))
--
-- x = waitForDeferred(
-- self.findChildren("1", request, found, (davxml.Read(),),
-- inherited_aces=filtered_aces)
-- )
-- yield x
-- x = x.getResult()
--
-- # Render from a DirectoryLister
-- standin = dirlist.DirectoryLister(
-- self.fp.path,
-- children,
-- self.contentTypes,
-- self.contentEncodings,
-- self.defaultType
-- )
-- yield standin.render(request)
-- return
--
-- # Do regular resource behavior from superclass
-- yield super(DAVFile, self).render(request)
--
-- render = deferredGenerator(render)
--
#
# Attach method handlers to DAVFile
- #
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070228/3c09602a/attachment.html
More information about the calendarserver-changes
mailing list