mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +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):
|
def get(self):
|
||||||
p = os.path.join(self.request.master.options.cadir, self.filename)
|
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-Type", "application/x-x509-ca-cert")
|
||||||
self.set_header(
|
self.set_header(
|
||||||
"Content-Disposition",
|
"Content-Disposition",
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import sys
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
resolver = None
|
resolver = None
|
||||||
|
|
||||||
if sys.platform == "linux2":
|
if re.match(r"linux(?:2)?", sys.platform):
|
||||||
from . import linux
|
from . import linux
|
||||||
resolver = linux.Resolver
|
resolver = linux.Resolver
|
||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
|
Loading…
Reference in New Issue
Block a user