Skip to content

Commit

Permalink
TypeError in data_received of client_proto #1770
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Mar 29, 2017
1 parent aba31f6 commit 8c95f91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Changes

- Dropped "%O" in access logger #1673

- TypeError in data_received of client_proto #1770


2.0.5 (2017-03-..)
------------------
Expand Down
11 changes: 6 additions & 5 deletions aiohttp/client_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def set_parser(self, parser, payload):
self._payload_parser = parser

if self._tail:
data, self._tail = self._tail, None
data, self._tail = self._tail, b''
self.data_received(data)

def set_response_params(self, *, timer=None,
Expand Down Expand Up @@ -184,7 +184,8 @@ def data_received(self, data):
else:
self.feed_data((message, payload), 0)

if upgraded:
self.data_received(tail)
else:
self._tail = tail
if tail:
if upgraded:
self.data_received(tail)
else:
self._tail = tail
2 changes: 1 addition & 1 deletion aiohttp/web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def data_received(self, data):
self._messages.append((msg, payload))

self._upgraded = upgraded
if upgraded:
if upgraded and tail:
self._message_tail = tail

# no parser, just store
Expand Down

0 comments on commit 8c95f91

Please sign in to comment.