RequestServer: Set request body for other methods that can have a body

This commit is contained in:
marcin mikołajczak 2024-09-20 17:54:03 +02:00 committed by Andreas Kling
parent 6862796d5e
commit fc2141c852
Notes: github-actions[bot] 2024-09-21 16:14:20 +00:00

View file

@ -286,7 +286,7 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString const& metho
if (method == "GET"sv) {
set_option(CURLOPT_HTTPGET, 1L);
} else if (method == "POST"sv) {
} else if (method.is_one_of("POST"sv, "PUT"sv, "PATCH"sv, "DELETE"sv)) {
request->body = request_body;
set_option(CURLOPT_POSTFIELDSIZE, request->body.size());
set_option(CURLOPT_POSTFIELDS, request->body.data());