File tree 1 file changed +1
-4
lines changed
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -181,14 +181,13 @@ def output_length(self) -> int:
181
181
182
182
def enable_chunked_encoding (self , chunk_size : Optional [int ] = None ) -> None :
183
183
"""Enables automatic chunked transfer encoding."""
184
- self ._chunked = True
185
-
186
184
if hdrs .CONTENT_LENGTH in self ._headers :
187
185
raise RuntimeError (
188
186
"You can't enable chunked encoding when a content length is set"
189
187
)
190
188
if chunk_size is not None :
191
189
warnings .warn ("Chunk size is deprecated #1615" , DeprecationWarning )
190
+ self ._chunked = True
192
191
193
192
def enable_compression (
194
193
self ,
@@ -493,8 +492,6 @@ async def _prepare_headers(self) -> None:
493
492
if not self ._must_be_empty_body :
494
493
writer .enable_chunking ()
495
494
headers [hdrs .TRANSFER_ENCODING ] = "chunked"
496
- if hdrs .CONTENT_LENGTH in headers :
497
- del headers [hdrs .CONTENT_LENGTH ]
498
495
elif self ._length_check : # Disabled for WebSockets
499
496
writer .length = self .content_length
500
497
if writer .length is None :
You can’t perform that action at this time.
0 commit comments