Set Content-Length header on succesful PUT
authorGuido Günther <agx@sigxcpu.org>
Mon, 27 May 2013 10:59:36 +0000 (12:59 +0200)
committerKeith Packard <keithp@keithp.com>
Tue, 28 May 2013 16:47:37 +0000 (10:47 -0600)
Otherwise new items need CollectionHTTPHandler.timeout seconds to
display in Sunbird/Lightning/Iceowl since it has to wait for the socket
to close.

calypso/__init__.py

index 65f4dcfa1761adf8b6ab4010570e1d10d14fee1b..dff22e0a7b6506898c499bafd0ee595b46292dbc 100644 (file)
@@ -387,6 +387,7 @@ class CollectionHTTPHandler(server.BaseHTTPRequestHandler):
                 #log.debug("replacement etag %s", etag)
 
                 self.send_response(client.CREATED)
+                self.send_header("Content-Length", 0)
                 self.send_header("ETag", etag)
                 self.end_headers()
             else: