|
28 | 28 |
|
29 | 29 | log = logging.getLogger(__name__)
|
30 | 30 |
|
| 31 | +DEFAULT_WINDOW_SIZE = 65535 |
| 32 | + |
| 33 | + |
31 | 34 | class HTTP20Connection(object):
|
32 | 35 | """
|
33 | 36 | An object representing a single HTTP/2 connection to a server.
|
@@ -59,7 +62,7 @@ class HTTP20Connection(object):
|
59 | 62 | If not provided then hyper's default ``SSLContext`` is used instead.
|
60 | 63 | :param proxy_host: (optional) The proxy to connect to. This can be an IP address
|
61 | 64 | or a host name and may include a port.
|
62 |
| - :param proxy_port: (optional) The proxy port to connect to. If not provided |
| 65 | + :param proxy_port: (optional) The proxy port to connect to. If not provided |
63 | 66 | and one also isn't provided in the ``proxy`` parameter, defaults to 8080.
|
64 | 67 | """
|
65 | 68 | def __init__(self, host, port=None, secure=None, window_manager=None, enable_push=False,
|
@@ -137,7 +140,7 @@ def __init_state(self):
|
137 | 140 |
|
138 | 141 | # Values for the settings used on an HTTP/2 connection.
|
139 | 142 | self._settings = {
|
140 |
| - SettingsFrame.INITIAL_WINDOW_SIZE: 65535, |
| 143 | + SettingsFrame.INITIAL_WINDOW_SIZE: DEFAULT_WINDOW_SIZE, |
141 | 144 | SettingsFrame.SETTINGS_MAX_FRAME_SIZE: FRAME_MAX_LEN,
|
142 | 145 | }
|
143 | 146 |
|
@@ -513,9 +516,9 @@ def _new_stream(self, stream_id=None, local_closed=False):
|
513 | 516 | s = Stream(
|
514 | 517 | stream_id or self.next_stream_id, self._send_cb, self._recv_cb,
|
515 | 518 | self._close_stream, self.encoder, self.decoder,
|
516 |
| - self.__wm_class(window_size), local_closed |
| 519 | + self.__wm_class(DEFAULT_WINDOW_SIZE), local_closed |
517 | 520 | )
|
518 |
| - s._out_flow_control_window = self._out_flow_control_window |
| 521 | + s._out_flow_control_window = window_size |
519 | 522 | self.streams[s.stream_id] = s
|
520 | 523 | self.next_stream_id += 2
|
521 | 524 |
|
|
0 commit comments