Hello,

I've updated libcurl (8.5.0 -> 8.6.0) in our http client and discovered a regression:

when http server send non-empty http body in response of HEAD request

http client finish connection with CURLE_WEIRD_SERVER_REPLY.

Part of the difference in logs is below:

-* STATE: PERFORMING => DONE handle 0x55f9fb6727c8; line 2588
-* multi_done[DONE]: status: 0 prem: 0 done: 0
-* multi_done, not reusing connection=0, forbid=0, close=1, premature=0, conn_multiplex=0
+* did not want a BODY, but seeing 4 bytes
+* readwrite_data() -> 8
+* Curl_readwrite() -> 8
+* multi_done[PERFORMING]: status: 8 prem: 1 done: 0
+* multi_done, not reusing connection=0, forbid=0, close=1, premature=1, conn_multiplex=0
 * The cache now contains 0 members
-* Curl_disconnect(conn #0, dead=0)
+* Curl_disconnect(conn #0, dead=1)
 * Closing connection
+SystemError: curl: Weird server reply: Invalid argument


Message "did not want a BODY" [1] was introduced in commit [2]. Moreover, function that returns CURLE_WEIRD_SERVER_REPLY

contains a comment: "/* BODY arrives although we want none, bail out */".

I just want to make sure that is was done intentionally, because it changes http client's behavior

and looks like a breaking change.


1. https://github.com/curl/curl/blob/843800297fdfdc2715cf0296c5ab07ba3f406091/lib/sendf.c#L575-L578

2. https://github.com/curl/curl/commit/d7b6ce64ce0ad787ad2ed3ee05c94938a6b4f551


Thanks,

Sergey

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

Reply via email to