summaryrefslogtreecommitdiff
path: root/fuse-httpfs
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-24 23:24:31 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-11-24 23:24:31 +0100
commit4fb7d2e1c0e9e80038148163650f47e69270e80a (patch)
tree8848b94169945884985b421cc0a5aab133885ab3 /fuse-httpfs
parente420859e28e950e2761829612816145b6e1232e9 (diff)
downloadfuse-httpfs-4fb7d2e1c0e9e80038148163650f47e69270e80a.tar.gz
fuse-httpfs-4fb7d2e1c0e9e80038148163650f47e69270e80a.zip
Cleanup and solve trailing '/' problem with redirects
* Format README as markdown. Mention dependencies * Fix 'timeout' * Run autopep8 on all python sources * Fix unittests * For HEAD requests explicitly allow to follow redirects. This solves the problem if you request: https://server/dir and then the server wants to redirect you to https://server/dir/ This should solve #1
Diffstat (limited to 'fuse-httpfs')
-rwxr-xr-xfuse-httpfs11
1 files changed, 5 insertions, 6 deletions
diff --git a/fuse-httpfs b/fuse-httpfs
index 56662a8..e6a8c24 100755
--- a/fuse-httpfs
+++ b/fuse-httpfs
@@ -5,7 +5,8 @@ import logging
import argparse
from httpfs import Config, Httpfs
-FORMAT = "%(threadName)s %(asctime)-15s %(levelname)s:%(name)s %(message)s"
+FORMAT = "%(threadName)s %(asctime)-15s %(levelname)s:%(name)s " + \
+ "%(filename)s:%(lineno)s %(message)s"
logging.basicConfig(level=logging.INFO, format=FORMAT)
p = argparse.ArgumentParser(
@@ -18,10 +19,8 @@ p.add_argument("--no_foreground", action="store_true", default=False,
p.add_argument("--debug", action="store_true", help="Enable fuse debug")
p.add_argument("--nothreads", action="store_true",
help="Disable fuse threads")
-p.add_argument("--connect_timeout", type=int,
- default=Config.timeout[0], help="HTTP connect timeout")
-p.add_argument("--read_timeout", type=int,
- default=Config.timeout[1], help="HTTP read timeout")
+p.add_argument("--timeout", type=float, default=None,
+ help="HTTP connect and read timeout")
p.add_argument("--ssl", choices=["default", "system", "none"],
help="SSL Verification", default="default")
p.add_argument("--system-ca", default="/etc/ssl/certs/ca-certificates.crt",
@@ -29,7 +28,7 @@ p.add_argument("--system-ca", default="/etc/ssl/certs/ca-certificates.crt",
args = vars(p.parse_args(sys.argv[1:]))
-Config.timeout = (args.pop("connect_timeout"), args.pop("read_timeout"))
+Config.timeout = args.pop("timeout")
Config.mountpoint = args.pop("mountpoint")
Config.verify = args.pop("ssl")
Config.system_ca = args.pop("system_ca")