mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
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:
parent
d1db27dc42
commit
d489e46448
Notes:
github-actions[bot]
2025-08-13 10:31:56 +00:00
Author: https://github.com/rmg-x
Commit: d489e46448
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5797
1 changed files with 1 additions and 1 deletions
|
@ -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:");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue