Re: Minimizing buffering

Stefan Eissing via curl-library <[email protected]> Mon, 16 Feb 2026 14:10:56 +0100
Newsgroups gmane.comp.web.curl.library
Message-ID <[email protected]>
Hi,

> Am 16.02.2026 um 12:43 schrieb Peter Krefting via curl-library <[email protected]>:
> 
> Hi!
> 
> I am using libcurl to connect to a text/event-source resource (server-sent events), which outputs small line-based event data. When I connect to a HTTP end-point, the write callback gets called often enough for this to work, but when it is over HTTPS it buffers events (circa 200 bytes per event) for more than five seconds, even when I set the curl buffer size to the minimum (1024 bytes).
> 
> Is there an additional HTTPS decryption buffer that I need to somehow override for this connection to get this working? I am using OpenSSL as the back-end.

libcurl does not buffer TLS records. It seems more likely that the buffering happens at the server. You should see this easily in wireshark when you look at the TLS records sent by the server. Use SSLKEYLOGFILE environment variable when invoking curl and provide that file to Wireshark for decryption.

Hope this helps,
Stefan

> 
> -- 
> \\// Peter - http://www.softwolves.pp.se/
> -- 
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
> Etiquette:   https://curl.se/mail/etiquette.html

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html