-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading files shouldn't always use chunked, especally when HTTP1.0 is used. #126
Labels
Comments
Setting
It's all in the code: |
Setting if data.is_form_data():
self.chunked = self.chunked or 8196 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
aiohttp (0.9.0 when this bug is opened) always uses 'transfer-encoding': 'chunked' for file uploading, even if
chunked
is set toFalse
orversion
is set toHttpVersion10
.This can be problematic in some cases. When the server doesn't support chunked multipart/form-data -- which is why I opened this issue -- the client doesn't respond for a very long time and then says
aiohttp.errors.ClientConnectionError: Can not read status line
.IMO, the
request
method should respect thechunked
switch, or even prefer the non-chunked way if the source is an actual file (content-length can be determined). I checked Firefox and the requests library, they don't send chunked packets by default.The text was updated successfully, but these errors were encountered: