]> arthur.barton.de Git - bup.git/commitdiff
cmd/web: tiny fix to make redirects work with Firefox. bup-0.15b
authorGabriel Filion <lelutin@gmail.com>
Mon, 12 Jul 2010 06:23:24 +0000 (02:23 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 12 Jul 2010 06:23:24 +0000 (02:23 -0400)
Firefox honours Content-Length even for 301 redirects, so if the field isn't
provided, it assumes there's an unlimited amount of data and just hangs.

Also fixed a typo in the man page.

Documentation/bup-web.1.md
cmd/web-cmd.py

index a334945257da5ab7c4a00e42bef47c6d332cd6a2..23e82a841281f8eee8dc9033678ab223e70b629e 100644 (file)
@@ -12,7 +12,7 @@ bup web [[hostname]:port]
 
 # DESCRIPTION
 
-`bup web` is a starts a web server that can browse bup repositories. The file
+`bup web` starts a web server that can browse bup repositories. The file
 hierarchy is the same as that shown by `bup-fuse`(1), `bup-ls`(1) and
 `bup-ftp`(1).
 
index 209e57d03ccae7642605c1d81f723d767df3bf50..b4120449e78576136e711b402af707b43916c05d 100755 (executable)
@@ -54,6 +54,7 @@ class BupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
             # redirect browser - doing basically what apache does
             self.send_response(301)
             self.send_header("Location", path + "/")
+            self.send_header("Content-Length", 0)
             self.end_headers()
             return