1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

AK: Move memory streams from LibCore

This commit is contained in:
Tim Schumacher 2023-01-25 20:19:05 +01:00 committed by Andrew Kaster
parent 11550f582b
commit 093cf428a3
46 changed files with 213 additions and 203 deletions

View file

@ -9,6 +9,7 @@
#include <AK/Base64.h>
#include <AK/Debug.h>
#include <AK/LexicalPath.h>
#include <AK/MemoryStream.h>
#include <AK/QuickSort.h>
#include <AK/StringBuilder.h>
#include <AK/URL.h>
@ -16,7 +17,6 @@
#include <LibCore/DirIterator.h>
#include <LibCore/File.h>
#include <LibCore/MappedFile.h>
#include <LibCore/MemoryStream.h>
#include <LibCore/MimeData.h>
#include <LibHTTP/HttpRequest.h>
#include <LibHTTP/HttpResponse.h>
@ -336,7 +336,7 @@ ErrorOr<void> Client::handle_directory_listing(String const& requested_path, Str
builder.append("</html>\n"sv);
auto response = builder.to_deprecated_string();
auto stream = TRY(Core::Stream::FixedMemoryStream::construct(response.bytes()));
auto stream = TRY(FixedMemoryStream::construct(response.bytes()));
return send_response(*stream, request, { .type = TRY(String::from_utf8("text/html"sv)), .length = response.length() });
}