diff options
Diffstat (limited to 'pathod/protocols/http2.py')
-rw-r--r-- | pathod/protocols/http2.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py index 118163d2..628e3f33 100644 --- a/pathod/protocols/http2.py +++ b/pathod/protocols/http2.py @@ -190,8 +190,8 @@ class HTTP2StateProtocol: stream_id = self._next_stream_id() return list(itertools.chain( - self._create_headers(headers, stream_id, end_stream=(request.body is None or len(request.body) == 0)), - self._create_body(request.body, stream_id))) + self._create_headers(headers, stream_id, end_stream=(request.content is None or len(request.content) == 0)), + self._create_body(request.content, stream_id))) def assemble_response(self, response): assert isinstance(response, mitmproxy.net.http.response.Response) @@ -207,8 +207,8 @@ class HTTP2StateProtocol: stream_id = self._next_stream_id() return list(itertools.chain( - self._create_headers(headers, stream_id, end_stream=(response.body is None or len(response.body) == 0)), - self._create_body(response.body, stream_id), + self._create_headers(headers, stream_id, end_stream=(response.content is None or len(response.content) == 0)), + self._create_body(response.content, stream_id), )) def perform_connection_preface(self, force=False): |