Closed deshmukhrajvardhan closed 6 years ago
Problem Identified: Overview:
In the (common to http1 and http2) buffsocket.py file a new buffer (space allocation) is created if the current one is filled before it is used by the other files
In the case of the other some files, the data is read before the buffer in buffsocket.py is full, so this case is never encountered.
Problem:
Soultion: I have set this [4] code:
if self._remaining_capacity<=11935:
self.new_buffer()
and it seems to work.
Help: Does it sound reasonable the keep the above comparison value a constant?
Thanks, Raj
[1] https://github.com/Lukasa/hyper/blob/75f25f73c17a16cb1f2ca7d46f390b0dfe4925dc/hyper/common/bufsocket.py#L165 [2] https://github.com/deshmukhrajvardhan/hyper/blob/ecf17b6bc143d3af75757bca43b1794000a96ae2/hyper/http11/parser.py#L75 [3] https://github.com/deshmukhrajvardhan/hyper/blob/ecf17b6bc143d3af75757bca43b1794000a96ae2/hyper/http11/connection.py#L291 [4] https://github.com/Lukasa/hyper/blob/75f25f73c17a16cb1f2ca7d46f390b0dfe4925dc/hyper/common/bufsocket.py#L164
UPDATE: i printed the self._buffer_end value and in the failed cases it is always = 65536 I assumed that this value should be <=65535.
Should the new_buffer() be called before this happens?
OLD MESSAGE: Hi Lucas, I had a problem with HTTP1.1 library. (After making 90 serial 'GET' method calls) The Wireshark pcap trace shows the full response but the BUFFER over here shows incomplete response.
This self._sock.buffer and the recv_into in self._sock.fill() is provided by socket library, Right?
Any tips on how to debug this?