Revision
1591
Author
cdaboo@apple.com
Date
2007-06-06 14:38:12 -0700 (Wed, 06 Jun 2007)

Log Message

Handle 404 errors properly for dropbox POST.

Modified Paths

Diff

Modified: CalendarServer/trunk/twistedcaldav/dropbox.py (1590 => 1591)


--- CalendarServer/trunk/twistedcaldav/dropbox.py	2007-06-06 21:35:54 UTC (rev 1590)
+++ CalendarServer/trunk/twistedcaldav/dropbox.py	2007-06-06 21:38:12 UTC (rev 1591)
@@ -210,6 +210,10 @@
         Handle subscribe/unsubscribe requests only.
         """
         
+        if not self.fp.exists():
+            log.err("File not found: %s" % (self.fp.path,))
+            raise HTTPError(responsecode.NOT_FOUND)
+
         # Read request body
         try:
             doc = waitForDeferred(davXMLFromStream(request.stream))