diff options
Diffstat (limited to 'pathod')
-rw-r--r-- | pathod/language/generators.py | 2 | ||||
-rw-r--r-- | pathod/pathoc.py | 8 | ||||
-rw-r--r-- | pathod/pathoc_cmdline.py | 1 | ||||
-rw-r--r-- | pathod/pathod_cmdline.py | 1 |
4 files changed, 3 insertions, 9 deletions
diff --git a/pathod/language/generators.py b/pathod/language/generators.py index 1961df74..70c6ad16 100644 --- a/pathod/language/generators.py +++ b/pathod/language/generators.py @@ -75,7 +75,7 @@ class RandomGenerator: class FileGenerator: def __init__(self, path): - self.path = path + self.path = os.path.expanduser(path) def __len__(self): return os.path.getsize(self.path) diff --git a/pathod/pathoc.py b/pathod/pathoc.py index 4a613349..63a15b55 100644 --- a/pathod/pathoc.py +++ b/pathod/pathoc.py @@ -223,14 +223,6 @@ class Pathoc(tcp.TCPClient): self.ws_framereader = None if self.use_http2: - if not tcp.HAS_ALPN: # pragma: no cover - log.write_raw( - self.fp, - "HTTP/2 requires ALPN support. " - "Please use OpenSSL >= 1.0.2. " - "Pathoc might not be working as expected without ALPN.", - timestamp=False - ) self.protocol = http2.HTTP2StateProtocol(self, dump_frames=self.http2_framedump) else: self.protocol = net_http.http1 diff --git a/pathod/pathoc_cmdline.py b/pathod/pathoc_cmdline.py index 3b738d47..0854f6ad 100644 --- a/pathod/pathoc_cmdline.py +++ b/pathod/pathoc_cmdline.py @@ -208,6 +208,7 @@ def args_pathoc(argv, stdout=sys.stdout, stderr=sys.stderr): reqs = [] for r in args.requests: + r = os.path.expanduser(r) if os.path.isfile(r): with open(r) as f: r = f.read() diff --git a/pathod/pathod_cmdline.py b/pathod/pathod_cmdline.py index dee19f4f..c646aaee 100644 --- a/pathod/pathod_cmdline.py +++ b/pathod/pathod_cmdline.py @@ -215,6 +215,7 @@ def args_pathod(argv, stdout_=sys.stdout, stderr_=sys.stderr): anchors = [] for patt, spec in args.anchors: + spec = os.path.expanduser(spec) if os.path.isfile(spec): with open(spec) as f: data = f.read() |