mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Merge pull request #1450 from vhaupert/master
Fix platform import, substitute "~" with user's home
This commit is contained in:
commit
47f0c21417
@ -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",
|
||||
|
@ -1,8 +1,9 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
resolver = None
|
||||
|
||||
if sys.platform == "linux2":
|
||||
if re.match(r"linux(?:2)?", sys.platform):
|
||||
from . import linux
|
||||
resolver = linux.Resolver
|
||||
elif sys.platform == "darwin":
|
||||
|
Loading…
Reference in New Issue
Block a user