Comments (2)
I'm toying around with a solution that "works", but the interaction between the common code and the asynchronous is a bit convoluted and I end up causing active waits. I should be able to come up with something, but if someone with more experience on the code has a simple fix, happy to get help.
from httpaf.
My solution here is to simply call the request parser until either no progress is made or no more data is available. This looks correct to me, but maybe slightly sub-optimal as it may be possible to better determine whether we can make more progress without systematically calling the parser once more if there is any data left available. In any case it does seem to fix our current issue, while not causing any busy loops.
from httpaf.
Related Issues (20)
- Segfault in lwt_echo_post HOT 6
- Lack of backpressure when client code does not schedule read (httpaf-lwt-unix) HOT 4
- Infinite write loop with "Transfer-encoding: chunked" when client prematurely terminates HOT 8
- Chunked responses seem to be incorrect with streaming replies HOT 1
- Timeouts while responding under load HOT 15
- Server_connection.next_write_operation triggers "prompt: input shrunk!" HOT 13
- Reader is not waken up in case of immediate header flush with zero response body size HOT 8
- Example for decoding Json content
- Invalid HTTP headers cause server to return empty response HOT 3
- [Header.replace] function is not working properly HOT 6
- No error raised when timeout occurs reading response body HOT 1
- 422 status is missing (Unprocessable_entity) HOT 1
- Set content-length automatically in Reqd.respond_with_string
- Parser resets to `Done` on failure HOT 1
- Latency under load
- http pipelining not working HOT 2
- Example in README does not work out of the box HOT 1
- Httpaf requrires OCaml >= 4.03, so `result` is not needed
- After `httpaf-lwt` and `httpaf-async` should there also be an `httpaf-eio` ? 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 httpaf.