Skip to content

Commit

Permalink
refactor response write track
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Kim committed Feb 9, 2017
1 parent e78d203 commit 75f87f5
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 384 deletions.
4 changes: 4 additions & 0 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ def _request(self, method, url, *,
if self.closed:
raise RuntimeError('Session is closed')

if not isinstance(chunked, bool):
warnings.warn('Chunk size is deprecated #1615',
DeprecationWarning, stacklevel=2)

redirects = 0
history = []

Expand Down
5 changes: 2 additions & 3 deletions aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,10 @@ def send(self, writer, reader):
self.version)

if self.compress:
request.add_compression_filter(self.compress)
request.enable_compression(self.compress)

if self.chunked is not None:
request.enable_chunked_encoding()
request.add_chunking_filter(self.chunked)
request.enable_chunking()

# set default content-type
if (self.method in self.POST_METHODS and
Expand Down
Loading

0 comments on commit 75f87f5

Please sign in to comment.