summaryrefslogtreecommitdiff
path: root/Userland/Services/WebServer/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/WebServer/Client.cpp')
-rw-r--r--Userland/Services/WebServer/Client.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp
index beb497438b..5e06d22338 100644
--- a/Userland/Services/WebServer/Client.cpp
+++ b/Userland/Services/WebServer/Client.cpp
@@ -14,8 +14,8 @@
#include <AK/StringBuilder.h>
#include <AK/URL.h>
#include <LibCore/DateTime.h>
+#include <LibCore/DeprecatedFile.h>
#include <LibCore/DirIterator.h>
-#include <LibCore/File.h>
#include <LibCore/MappedFile.h>
#include <LibCore/MimeData.h>
#include <LibHTTP/HttpRequest.h>
@@ -132,7 +132,7 @@ ErrorOr<bool> Client::handle_request(ReadonlyBytes raw_request)
path_builder.append(requested_path);
auto real_path = TRY(path_builder.to_string());
- if (Core::File::is_directory(real_path.bytes_as_string_view())) {
+ if (Core::DeprecatedFile::is_directory(real_path.bytes_as_string_view())) {
if (!resource_decoded.ends_with('/')) {
StringBuilder red;
@@ -147,14 +147,14 @@ ErrorOr<bool> Client::handle_request(ReadonlyBytes raw_request)
index_html_path_builder.append(real_path);
index_html_path_builder.append("/index.html"sv);
auto index_html_path = TRY(index_html_path_builder.to_string());
- if (!Core::File::exists(index_html_path)) {
+ if (!Core::DeprecatedFile::exists(index_html_path)) {
TRY(handle_directory_listing(requested_path, real_path, request));
return true;
}
real_path = index_html_path;
}
- auto file = Core::File::construct(real_path.bytes_as_string_view());
+ auto file = Core::DeprecatedFile::construct(real_path.bytes_as_string_view());
if (!file->open(Core::OpenMode::ReadOnly)) {
TRY(send_error_response(404, request));
return false;
@@ -169,7 +169,7 @@ ErrorOr<bool> Client::handle_request(ReadonlyBytes raw_request)
auto const info = ContentInfo {
.type = TRY(String::from_deprecated_string(Core::guess_mime_type_based_on_filename(real_path.bytes_as_string_view()))),
- .length = TRY(Core::File::size(real_path.bytes_as_string_view()))
+ .length = TRY(Core::DeprecatedFile::size(real_path.bytes_as_string_view()))
};
TRY(send_response(*stream, request, move(info)));
return true;