From 4a4e7f1801fee9a6782b7420bc6fe525311db77b Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Mon, 12 Jul 2010 02:23:24 -0400 Subject: [PATCH] cmd/web: tiny fix to make redirects work with Firefox. 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 | 2 +- cmd/web-cmd.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/bup-web.1.md b/Documentation/bup-web.1.md index a334945..23e82a8 100644 --- a/Documentation/bup-web.1.md +++ b/Documentation/bup-web.1.md @@ -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). diff --git a/cmd/web-cmd.py b/cmd/web-cmd.py index 209e57d..b412044 100755 --- a/cmd/web-cmd.py +++ b/cmd/web-cmd.py @@ -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 -- 2.39.5