Merge branch 'h2' of https://github.com/Kriechi/mitmproxy into Kriechi-h2

This commit is contained in:
Aldo Cortesi 2016-02-18 10:22:33 +13:00
commit 46abde94a4
2 changed files with 1 additions and 16 deletions

View File

@ -9,8 +9,6 @@ from netlib.exceptions import HttpException
from netlib.http import Headers from netlib.http import Headers
from netlib.utils import http2_read_raw_frame from netlib.utils import http2_read_raw_frame
import hyperframe
import h2
from h2.connection import H2Connection from h2.connection import H2Connection
from h2.events import * from h2.events import *
@ -232,19 +230,6 @@ class Http2Layer(Layer):
stream.zombie = time.time() stream.zombie = time.time()
return return
frame, _ = hyperframe.frame.Frame.parse_frame_header(raw_frame[:9])
if is_server:
list = self.server_reset_streams
else:
list = self.client_reset_streams
if frame.stream_id in list:
# this frame belongs to a reset stream - just ignore it
if isinstance(frame, hyperframe.frame.HeadersFrame) or isinstance(frame, hyperframe.frame.ContinuationFrame):
# we need to keep the hpack-decoder happy too
source_conn.h2.decoder.decode(raw_frame[9:])
continue
events = source_conn.h2.receive_data(raw_frame) events = source_conn.h2.receive_data(raw_frame)
source_conn.send(source_conn.h2.data_to_send()) source_conn.send(source_conn.h2.data_to_send())

View File

@ -54,7 +54,7 @@ setup(
# It is not considered best practice to use install_requires to pin dependencies to specific versions. # It is not considered best practice to use install_requires to pin dependencies to specific versions.
install_requires=[ install_requires=[
"netlib=={}".format(version.VERSION), "netlib=={}".format(version.VERSION),
"h2>=2.1.0, <2.2", "h2>=2.1.2, <3.0",
"tornado>=4.3, <4.4", "tornado>=4.3, <4.4",
"configargparse>=0.10, <0.11", "configargparse>=0.10, <0.11",
"pyperclip>=1.5.22, <1.6", "pyperclip>=1.5.22, <1.6",