Comments (3)
@TheLortex @haesbaert @dinosaure pinging you, because you guys helped me before with other TCP/IP related issues. 😬
from ocaml-cohttp.
I can indeed disable the Nagle's Algorithm and make the issue disappear by using a Stack wrapper like this:
module Stack_nodelay (Stack : Tcpip.Stack.V4V6) = struct
include Stack
module TCP = struct
include Stack.TCP
let write = Stack.TCP.write_nodelay
let writev = Stack.TCP.writev_nodelay
end
end
However, as I mentioned above, even with ~flush:false
it creates three separate "tinygrams" for one response.
![Bildschirmfoto 2023-10-05 um 17 43 54](https://private-user-images.githubusercontent.com/7792669/272959699-70b955a2-4a79-473c-b9ef-c9b54018c61f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwODAzNTYsIm5iZiI6MTcxOTA4MDA1NiwicGF0aCI6Ii83NzkyNjY5LzI3Mjk1OTY5OS03MGI5NTVhMi00YTc5LTQ3M2MtYjllZi1jOWI1NDAxOGM2MWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjJUMTgxNDE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGFjZDBjZTBlY2NkMDkzOTkzZGVkNzI3ZmMyZDgxY2U4N2M0ZDQ2NWIxNjEzNzM0MDZkMTU1NjBkZjBjMDg3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.GBYXfib7infppk_yfnF6O9o1YOO4SJ-BqmZuPb-RNps)
from ocaml-cohttp.
I found one of the problems:
ocaml-cohttp/cohttp-mirage/src/io.ml
Lines 60 to 62 in daf1323
Is there a reason why every write in cohttp-mirage is flushed @avsm ?
from ocaml-cohttp.
Related Issues (20)
- Cohttp_eio.Server.run is hardcoded to listen on loopback HOT 2
- Cohttp-eio: response body not flushed? HOT 2
- cohttp-eio: "large" chunked-response → exception Eio.Io Unix_error (Invalid argument, "writev", "") HOT 4
- cohttp-eio: confusing use of the `~sw` argument HOT 1
- cohttp 5.3.0: `Cookie.Set_cookie_hdr.extract` only work with lower case `set-cookie` and not uppercase `Set-Cookie` HOT 2
- Incompatibility with cohttp-lwt Server module IO HOT 3
- Supporting CONNECT requests.
- Add connection reset tests to cohttp-eio
- http library name HOT 2
- cohttp-curl swallows errors HOT 3
- Body is not read if the body is in a different packet than the request headers HOT 2
- Parsing of malformed headers fails silently
- `header_io.ml`''s `parse` doesn't support multi-line "folded" headers HOT 1
- cohttp_curl: First HTTP header is prepended to output HOT 1
- Cohttp-lwt, Server: How should we now close `Expert response_action? HOT 2
- Please backport to v4 support for cmdliner >= 1.2.0 HOT 7
- Bad GET request when host is an IPv6 litteral results in 400 bad Request HOT 2
- Make response type abstract
- SSL read() error while reading response from a POST request HOT 9
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 ocaml-cohttp.