mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
WebServer: Remove a call to String::from_deprecated_string
guess_mime_type_based_on_filename() returns a StringView, so no need to bring DeprecatedString's (implicit) ctor into this. No behavior change.
This commit is contained in:
parent
8e5ebb04f4
commit
a83f4ec186
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ ErrorOr<bool> Client::handle_request(ReadonlyBytes raw_request)
|
|||
auto stream = TRY(Core::File::open(real_path.bytes_as_string_view(), Core::File::OpenMode::Read));
|
||||
|
||||
auto const info = ContentInfo {
|
||||
.type = TRY(String::from_deprecated_string(Core::guess_mime_type_based_on_filename(real_path.bytes_as_string_view()))),
|
||||
.type = TRY(String::from_utf8(Core::guess_mime_type_based_on_filename(real_path.bytes_as_string_view()))),
|
||||
.length = TRY(Core::DeprecatedFile::size(real_path.bytes_as_string_view()))
|
||||
};
|
||||
TRY(send_response(*stream, request, move(info)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue