RequestServer: Clarify comment for removing Content-Type header

This comment assumed that the reader knew how curl behaved with empty
header values.
This commit is contained in:
rmg-x 2025-08-09 11:49:24 -05:00 committed by Tim Flynn
parent d1db27dc42
commit d489e46448
Notes: github-actions[bot] 2025-08-13 10:31:56 +00:00

View file

@ -536,7 +536,7 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString method, URL:
struct curl_slist* curl_headers = nullptr;
// NOTE: CURLOPT_POSTFIELDS automatically sets the Content-Type header.
// Set it to empty if the headers passed in don't contain a content type.
// Tell curl to remove it by setting a blank value if the headers passed in don't contain a content type.
if (did_set_body && !request_headers.contains("Content-Type"))
curl_headers = curl_slist_append(curl_headers, "Content-Type:");