From: Will Rouesnel Date: Thu, 12 Jun 2014 17:58:49 +0000 (+1000) Subject: Fix HEAD request handling in bup-web X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=acdf5ff7aafbaa47d125b4847b10618b99f6c1dd;p=packages%2Fb%2Fbup.git Fix HEAD request handling in bup-web HEAD requests to files did not set self.finished(). This causes problems with user-agents that expect some type of request since it never closes (OpenOffice/LibreOffice will notably stall opening files from a URL). This patch stands alone from WebDAV but also fixes the problem there. The problem can be demonstrated like this: bup web curl -I 'http://127.0.0.1:8080/some/file' Signed-off-by: Will Rouesnel [rlb@defaultvalue.org: adjust commit message] Reviewed-by: Rob Browning Tested-by: Rob Browning --- diff --git a/cmd/web-cmd.py b/cmd/web-cmd.py index c94b7c6..fc4d117 100755 --- a/cmd/web-cmd.py +++ b/cmd/web-cmd.py @@ -143,6 +143,8 @@ class BupRequestHandler(tornado.web.RequestHandler): self.request.connection.stream.write(blob, callback=lambda: me(me)) write_more(write_more) + else: + self.finish() def _guess_type(self, path): """Guess the type of a file.