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.
This commit is contained in:
Vincent Haupert 2016-07-30 12:49:00 +02:00
parent 73b7da1a03
commit 07f77f0866

View File

@ -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",