mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 06:06:48 +00:00
LibHTTP: Always send Content-Length header in POST requests
Required by Google services, Content-Length should always been sent, even when there is no body.
This commit is contained in:
parent
1473bc9169
commit
b8b263d9c3
Notes:
sideshowbarker
2024-07-17 04:43:02 +09:00
Author: https://github.com/Lubrsi
Commit: b8b263d9c3
Pull-request: https://github.com/SerenityOS/serenity/pull/15964
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ ByteBuffer HttpRequest::to_raw_request() const
|
|||
builder.append(header.value);
|
||||
builder.append("\r\n"sv);
|
||||
}
|
||||
if (!m_body.is_empty()) {
|
||||
if (!m_body.is_empty() || method() == Method::POST) {
|
||||
builder.appendff("Content-Length: {}\r\n\r\n", m_body.size());
|
||||
builder.append((char const*)m_body.data(), m_body.size());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue