 +from twisted.web2.http import HTTPError
 +from twisted.web2.http import StatusResponse
 +from twisted.web2.iweb import IResponse
++from twisted.web2.stream import MemoryStream
 +
 +import md5
 +
 +def storeResource(
 +    request,
-+    source=None, source_uri=None,
++    source=None, source_uri=None, data=None,
 +    destination=None, destination_uri=None,
 +    deletesource=False,
 +    depth="0"

===================================================================
--- twisted/web2/dav/method/put_common.py	(revision 0)
+++ twisted/web2/dav/method/put_common.py	(revision 0)
@@ -0,0 +1,259 @@
+##
+# Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
+#

+        if source is not None:
+            response = maybeDeferred(copy, source.fp, destination.fp, destination_uri, depth)
+        else:
+            datastream = request.stream
+            if data is not None:
+                datastream = MemoryStream(data)
+            md5 = MD5StreamWrapper(datastream)
+            response = maybeDeferred(put, md5, destination.fp)
+
+        response = waitForDeferred(response)
