1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:47:35 +00:00

LibProtocol: Use AllocatingMemoryStream to buffer requests

This commit is contained in:
Tim Schumacher 2023-01-09 12:22:08 +01:00 committed by Jelle Raaijmakers
parent 8f4c67672c
commit 5320ed0fd6
2 changed files with 4 additions and 2 deletions

View file

@ -102,7 +102,8 @@ void Request::set_should_buffer_all_input(bool value)
};
on_finish = [this](auto success, u32 total_size) {
auto output_buffer = m_internal_buffered_data->payload_stream.copy_into_contiguous_buffer();
auto output_buffer = ByteBuffer::create_uninitialized(m_internal_buffered_data->payload_stream.used_buffer_size()).release_value_but_fixme_should_propagate_errors();
m_internal_buffered_data->payload_stream.read_entire_buffer(output_buffer).release_value_but_fixme_should_propagate_errors();
on_buffered_request_finish(
success,
total_size,