diff options
author | Vincent Haupert <vincent.haupert@gmail.com> | 2016-07-30 12:49:00 +0200 |
---|---|---|
committer | Vincent Haupert <vincent.haupert@gmail.com> | 2016-07-30 12:49:00 +0200 |
commit | 07f77f086673a065d2f0f34a85b8e9ab6b06b06a (patch) | |
tree | 258d8164696aefe00b890181fb8ccfcc1d85ead4 | |
parent | 73b7da1a0360f50e660e1983ec02dd5225bde3a3 (diff) | |
download | mitmproxy-07f77f086673a065d2f0f34a85b8e9ab6b06b06a.tar.gz mitmproxy-07f77f086673a065d2f0f34a85b8e9ab6b06b06a.tar.bz2 mitmproxy-07f77f086673a065d2f0f34a85b8e9ab6b06b06a.zip |
Substitute tilde with user's home.
When downloding the mitmproxy certificate using mitm.it, '~' currently
is not expanded causing a FileNotFoundException. This patch uses
expanduser() to replace the initial tilde with the user's home.
-rw-r--r-- | mitmproxy/onboarding/app.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mitmproxy/onboarding/app.py b/mitmproxy/onboarding/app.py index e26efae8..491ddbfe 100644 --- a/mitmproxy/onboarding/app.py +++ b/mitmproxy/onboarding/app.py @@ -48,6 +48,7 @@ class PEM(tornado.web.RequestHandler): def get(self): p = os.path.join(self.request.master.options.cadir, self.filename) + p = os.path.expanduser(p) self.set_header("Content-Type", "application/x-x509-ca-cert") self.set_header( "Content-Disposition", |