immediately send push to client

This commit is contained in:
Thomas Kriechbaumer 2016-05-21 17:42:47 +02:00
parent 395b11d288
commit 0cb2e656cd
1 changed files with 1 additions and 0 deletions

View File

@ -174,6 +174,7 @@ class Http2Layer(Layer):
parent_eid = self.server_to_client_stream_ids[event.parent_stream_id] parent_eid = self.server_to_client_stream_ids[event.parent_stream_id]
with self.client_conn.h2.lock: with self.client_conn.h2.lock:
self.client_conn.h2.push_stream(parent_eid, event.pushed_stream_id, event.headers) self.client_conn.h2.push_stream(parent_eid, event.pushed_stream_id, event.headers)
self.client_conn.send(self.client_conn.h2.data_to_send())
headers = Headers([[str(k), str(v)] for k, v in event.headers]) headers = Headers([[str(k), str(v)] for k, v in event.headers])
headers['x-mitmproxy-pushed'] = 'true' headers['x-mitmproxy-pushed'] = 'true'