diff options
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/certutils.py | 3 | ||||
-rw-r--r-- | netlib/http/request.py | 2 | ||||
-rw-r--r-- | netlib/tcp.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py index 93366a99..e6d71c39 100644 --- a/netlib/certutils.py +++ b/netlib/certutils.py @@ -12,7 +12,8 @@ from pyasn1.codec.der.decoder import decode from pyasn1.error import PyAsn1Error import OpenSSL -DEFAULT_EXP = 157680000 # = 24 * 60 * 60 * 365 * 5 +# Default expiry must not be too long: https://github.com/mitmproxy/mitmproxy/issues/815 +DEFAULT_EXP = 94608000 # = 24 * 60 * 60 * 365 * 3 # Generated with "openssl dhparam". It's too slow to generate this on startup. DEFAULT_DHPARAM = b""" -----BEGIN DH PARAMETERS----- diff --git a/netlib/http/request.py b/netlib/http/request.py index 92d99532..5ebf21a5 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -92,6 +92,8 @@ class Request(Message): Target host. This may be parsed from the raw request (e.g. from a ``GET http://example.com/ HTTP/1.1`` request line) or inferred from the proxy mode (e.g. an IP in transparent mode). + + Setting the host attribute also updates the host header, if present. """ if six.PY2: # pragma: nocover diff --git a/netlib/tcp.py b/netlib/tcp.py index 33776fc4..8e46d4f6 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -560,8 +560,6 @@ class TCPClient(_Connection): @address.setter def address(self, address): - if self.connection: - raise RuntimeError("Cannot change server address after establishing connection") if address: self.__address = Address.wrap(address) else: |