From 07f77f086673a065d2f0f34a85b8e9ab6b06b06a Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Sat, 30 Jul 2016 12:49:00 +0200 Subject: 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. --- mitmproxy/onboarding/app.py | 1 + 1 file changed, 1 insertion(+) 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", -- cgit v1.2.3