[CalendarServer-changes] [5836] CalendarServer/branches/new-store/twistedcaldav/storebridge.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 1 22:06:59 PDT 2010


Revision: 5836
          http://trac.macosforge.org/projects/calendarserver/changeset/5836
Author:   glyph at apple.com
Date:     2010-07-01 22:06:58 -0700 (Thu, 01 Jul 2010)
Log Message:
-----------
Create a Response object from the stream to make attachments' http_GET work.

Modified Paths:
--------------
    CalendarServer/branches/new-store/twistedcaldav/storebridge.py

Modified: CalendarServer/branches/new-store/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/storebridge.py	2010-07-01 23:58:23 UTC (rev 5835)
+++ CalendarServer/branches/new-store/twistedcaldav/storebridge.py	2010-07-02 05:06:58 UTC (rev 5836)
@@ -40,7 +40,7 @@
 from twext.web2.dav import davxml
 from twext.web2.dav.resource import TwistedGETContentMD5
 from twext.web2.dav.util import parentForURL, allDataFromStream, joinURL
-from twext.web2.http import HTTPError, StatusResponse
+from twext.web2.http import HTTPError, StatusResponse, Response
 from twext.web2.stream import ProducerStream, readStream
 
 from twistedcaldav.static import CalDAVFile, ScheduleInboxFile, \
@@ -250,7 +250,6 @@
 
 
     def readProperty(self, property, request):
-        print 'READING PROPERTY', property, 'ON', self
         if type(property) is tuple:
             qname = property
         else:
@@ -400,9 +399,9 @@
             def dataReceived(self, data):
                 stream.write(data)
             def connectionLost(self, reason):
-                stream.finish(reason)
+                stream.finish()
         self._newStoreAttachment.retrieve(StreamProtocol())
-        return stream
+        return Response(OK, None, stream)
 
 
     def http_DELETE(self, request):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100701/f3269b04/attachment.html>


More information about the calendarserver-changes mailing list