]> git.ipfire.org Git - thirdparty/curl.git/commit
curl_setup: Disable by default recv-before-send in Windows
authorJay Satiro <raysatiro@yahoo.com>
Fri, 3 Feb 2023 08:11:49 +0000 (03:11 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 9 Feb 2023 06:30:10 +0000 (01:30 -0500)
commitb4b6e4f1fabf0a797c5f4f16f13d8b0f455e7207
tree2a2782f219f13c7296fee40ab4c8b4df4a92692f
parentead2b2d4f65ef433b2505b61c547baa106557100
curl_setup: Disable by default recv-before-send in Windows

Prior to this change a workaround for Windows to recv before every send
was enabled by default. The way it works is a recv is called before
every send and saves the received data, in case send fails because in
Windows apparently that can wipe out the socket's internal received
data buffer.

This feature has led to several bugs because the way libcurl operates
it waits on a socket to read or to write, and may not at all times
check for buffered receive data.

Two recent significant bugs this workaround caused:
- Broken Schannel TLS 1.3 connections (#9431)
- HTTP/2 arbitrary hangs (#10253)

The actual code remains though it is disabled by default. Though future
changes to connection filter buffering could improve the situation IMO
it's just not tenable to manage this workaround.

Ref: https://github.com/curl/curl/issues/657
Ref: https://github.com/curl/curl/pull/668
Ref: https://github.com/curl/curl/pull/720

Ref: https://github.com/curl/curl/issues/9431
Ref: https://github.com/curl/curl/issues/10253

Closes https://github.com/curl/curl/pull/10409
lib/curl_setup.h
tests/data/test1517
tests/libtest/lib1517.c