mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 04:37:22 +00:00
RequestServer: Clarify comment for removing Content-Type header
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
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