mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
WebServer: Set Content-Length: 0 header during redirection
Fixes #26431 Ref: https://bugs.python.org/issue43972
This commit is contained in:
committed by
Nico Weber
parent
0c9c0ba44c
commit
6c9677f27d
@@ -228,6 +228,7 @@ ErrorOr<void> Client::send_redirect(StringView redirect_path, HTTP::HttpRequest
|
||||
{
|
||||
StringBuilder builder;
|
||||
TRY(builder.try_append("HTTP/1.0 301 Moved Permanently\r\n"sv));
|
||||
TRY(builder.try_append("Content-Length: 0\r\n"sv));
|
||||
TRY(builder.try_append("Location: "sv));
|
||||
TRY(builder.try_append(redirect_path));
|
||||
TRY(builder.try_append("\r\n"sv));
|
||||
|
||||
Reference in New Issue
Block a user