[CalendarServer-changes] [10843] CalendarServer/trunk/twistedcaldav/method/put.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 4 19:36:01 PST 2013
Revision: 10843
http://trac.calendarserver.org//changeset/10843
Author: cdaboo at apple.com
Date: 2013-03-04 19:36:01 -0800 (Mon, 04 Mar 2013)
Log Message:
-----------
Don't propagate PUTs up to twext - our resource classes must completely handle it.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/method/put.py
Modified: CalendarServer/trunk/twistedcaldav/method/put.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put.py 2013-03-05 00:49:46 UTC (rev 10842)
+++ CalendarServer/trunk/twistedcaldav/method/put.py 2013-03-05 03:36:01 UTC (rev 10843)
@@ -31,8 +31,7 @@
from twistedcaldav.caldavxml import caldav_namespace
from twistedcaldav.method.put_common import StoreCalendarObjectResource
-from twistedcaldav.resource import isPseudoCalendarCollectionResource, \
- CalDAVResource
+from twistedcaldav.resource import isPseudoCalendarCollectionResource
log = Logger()
@@ -158,13 +157,6 @@
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(e)))
else:
- result = (yield super(CalDAVResource, self).http_PUT(request))
-
- if not hasattr(request, "extendedLogItems"):
- request.extendedLogItems = {}
- clength = request.headers.getHeader("content-length", 0)
- if clength == 0:
- clength = self.contentLength()
- request.extendedLogItems["cl"] = str(clength)
-
- returnValue(result)
+ # No longer support arbitrary PUTs to resource. Instead we are going to require all the
+ # resource classes we care about to explicitly define their own http_PUT.
+ raise HTTPError(StatusResponse(responsecode.FORBIDDEN, "PUTs not allowed here"))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130304/51e0afc8/attachment.html>
More information about the calendarserver-changes
mailing list