--- server.py	2011-09-12 22:31:35.000000000 +1000
+++ server_2.py	2012-01-31 18:08:57.000000000 +1100
@@ -28,7 +28,7 @@
 from contextlib import contextmanager
 
 from webob import Request, Response, UTC
-from webob.exc import HTTPAccepted, HTTPBadRequest, HTTPCreated, \
+from webob.exc import HTTPAccepted, HTTPBadRequest, HTTPAccepted, HTTPCreated, \
     HTTPInternalServerError, HTTPNoContent, HTTPNotFound, \
     HTTPNotModified, HTTPPreconditionFailed, \
     HTTPRequestTimeout, HTTPUnprocessableEntity, HTTPMethodNotAllowed
@@ -287,15 +287,20 @@
 
         :param timestamp: timestamp to compare with each file
         """
+
+        ret = True
+
         timestamp = normalize_timestamp(timestamp)
         for fname in os.listdir(self.datadir):
             if fname < timestamp:
                 try:
-                    os.unlink(os.path.join(self.datadir, fname))
+                    ret = os.unlink(os.path.join(self.datadir, fname))
                 except OSError, err:    # pragma: no cover
                     if err.errno != errno.ENOENT:
                         raise
 
+        return ret
+
     def drop_cache(self, fd, offset, length):
         """Method for no-oping buffer cache drop method."""
         if not self.keep_cache:
@@ -518,7 +523,9 @@
                     header_caps = header_key.title()
                     metadata[header_caps] = request.headers[header_key]
             file.put(fd, tmppath, metadata)
-        file.unlinkold(metadata['X-Timestamp'])
+
+        ret = file.unlinkold(metadata['X-Timestamp'])
+
         if not orig_timestamp or \
                 orig_timestamp < request.headers['x-timestamp']:
             self.container_update('PUT', account, container, obj,
@@ -529,7 +536,15 @@
                  'x-etag': file.metadata['ETag'],
                  'x-trans-id': request.headers.get('x-trans-id', '-')},
                 device)
-        resp = HTTPCreated(request=request, etag=etag)
+
+        if ret is None:
+
+            resp = HTTPAccepted(request=request, etag=etag)
+
+        else:
+
+            resp = HTTPCreated(request=request, etag=etag)
+
         return resp
 
     def GET(self, request):
@@ -746,3 +761,4 @@
     conf = global_conf.copy()
     conf.update(local_conf)
     return ObjectController(conf)
+
