Comments (11)
added branch with experimental work https://github.com/KeepSafe/aiohttp/tree/streamreader-payload
@asvetlov what do you think?
from aiohttp.
i'm going to merge this branch to master.
@asvetlov @popravich @kxepal objections?
from aiohttp.
Sorry, I still have no time for review.
Will do it up to end of Sunday.
from aiohttp.
looks good, no objections
from aiohttp.
Hm. While looks good, it breaks some my code. Currently, if you call ClientResponse.content.read()
it reads and emits one single chunk. This allowed to process chunked response chunk by chunk without worry about the details. With streamparser-payload
changes it reads and returns all available chunks in one shot and doesn't tries to handle following ones on the next call. However, I didn't looks carefully yet for alternative solution on feature branch, may be I should rewrite some things in different way.
from aiohttp.
accidentally removed comment :(
from aiohttp.
Yea, figured that. Was easy to fix.
However, content.readany()
isn't proper replacement since still it squashes multiple chunks into one big bytearray. Partially replacement for me was using content.readline()
instead, but it makes handling EventSource a bit complex since it's all about new lines. I wonder, may be add content.readchunk()
method specially for chunked transfer response? Will try to play around to make PR about if you don't mind.
from aiohttp.
Was unable to make readchunk()
method since it would require to break some things for almost no reason. However, I found that FlowControlDataQueue
is perfectly fits the goal and the only what it need is to make it replaceable for FlowControlStreamReader
. Check #100 for the related changes.
from aiohttp.
LGTM!
from aiohttp.
merged
from aiohttp.
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.
from aiohttp.
Related Issues (20)
- Please update llhttp to 9.2.1 HOT 7
- Using MultipartWriter.append_json breaks in 3.9.4 with AssertionError "assert CONTENT_DISPOSITION in payload.headers" HOT 8
- Exception occurred while requesting https URL using proxy aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host HOT 3
- Documentation mentions async_timeout as dependency HOT 2
- TimeoutError instead of 403 "Forbidden" in case of not corresponding content length HOT 4
- CONTRIB: easily-integrated minimal http server example HOT 1
- aiohttp ^C hangs when psycopg connection pool created HOT 1
- llhttp should be a separate, optional package HOT 2
- Error message not always propagated on 3.9.4 HOT 3
- ValueError: I/O operation on closed file on WSL HOT 2
- Security improvement: raise_for_status + ClientError prevent tokens from leaking HOT 5
- Broken HTTP request parsing: Upgrade: h2c header leads to discarded body HOT 7
- aiohttp does not support concurrent requests exceeding 500. HOT 1
- Termux aiohttp could not build wheels for aiohttp HOT 5
- aiohttp cannot make HTTPS (SSL) requests in a Windows container HOT 10
- DNS over HTTPS (DoH) HOT 1
- Unmonitored websocket task triggers false errors in logs HOT 1
- Documentation not working HOT 1
- https://docs.aiohttp.org/ has been defaced/squatted HOT 1
- aiohttp.org site is down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiohttp.