curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

CURLE_BAD_FUNCTION_ARGUMENT for invalid response header filed

From: bhavesh soni via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 28 Feb 2023 11:51:20 +0530

Hi there,

While uploading a tgz file on to a server via cURL 7.84.0 onwards, I hit a
response with error code of CURLE_BAD_FUNCTION_ARGUMENT.

Debugging respone header, I could see indeed there is an "additional" HTTP
response code in the header fields without a colon (:). Probably that's the
reason cURL is invalidating the response with "curl: (43) A libcurl
function was given a bad argument".

I don't have control over server code that is generating extra response
filed header (HTTP/1.0 200 OK).

Is there anyway, I can modify cURL source code at my end building custom
curl to link with?



For ref, in below response the first response header is
successfully validated by curl (even without : field), but the other one
highlighted would fail.

[image: image.png]

Thanks,
Bhavesh


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

image.png
(image/png attachment: image.png)

Received on 2023-02-28