Skip to content

Commit ccf3a71

Browse files
committed
WebServer: Set Content-Length: 0 header during redirection
Fixes #26431 Ref: https://bugs.python.org/issue43972
1 parent f750bab commit ccf3a71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Userland/Services/WebServer/Client.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ ErrorOr<void> Client::send_redirect(StringView redirect_path, HTTP::HttpRequest
228228
{
229229
StringBuilder builder;
230230
TRY(builder.try_append("HTTP/1.0 301 Moved Permanently\r\n"sv));
231+
TRY(builder.try_append("Content-Length: 0\r\n"sv));
231232
TRY(builder.try_append("Location: "sv));
232233
TRY(builder.try_append(redirect_path));
233234
TRY(builder.try_append("\r\n"sv));

0 commit comments

Comments
 (0)