ladybird/Services/RequestServer/RequestClient.ipc
Andreas Kling c0b19ff981 RequestServer: Send bytecode cache sidecars as files
Map JavaScript bytecode cache sidecars from the HTTP disk cache instead
of copying them into anonymous shared buffers while handing response
headers to WebContent. Store the mapped data as ImmutableBytes on the
fetch response so script fetching can decode directly from the mapped
sidecar bytes.

Add LibHTTP coverage for retrieving associated cache data as a mappable
file, alongside the existing byte-buffer retrieval API.
2026-05-16 08:13:35 +02:00

32 lines
1.7 KiB
Text

#include <LibHTTP/Header.h>
#include <LibRequests/CacheSizes.h>
#include <LibRequests/NetworkError.h>
#include <LibRequests/RequestTimingInfo.h>
#include <LibURL/URL.h>
#include <RequestServer/RequestType.h>
endpoint RequestClient
{
request_started(u64 request_id, IPC::File fd) =|
request_body_file_available(u64 request_id, IPC::File fd, u64 offset, u64 size) =|
request_cached_body_file_available(u64 request_id, IPC::File fd, u64 offset, u64 size) =|
request_finished(u64 request_id, u64 total_size, Requests::RequestTimingInfo timing_info, Optional<Requests::NetworkError> network_error) =|
headers_became_available(u64 request_id, Vector<HTTP::Header> response_headers, Optional<u32> status_code, Optional<String> reason_phrase, Optional<IPC::File> javascript_bytecode, u64 javascript_bytecode_size, Optional<u64> javascript_bytecode_cache_vary_key) =|
retrieve_http_cookie(int client_id, u64 request_id, ::RequestServer::RequestType request_type, URL::URL url) =|
// Websocket API
// FIXME: See if this can be merged with the regular APIs
websocket_connected(u64 websocket_id) =|
websocket_received(u64 websocket_id, bool is_text, ByteBuffer data) =|
websocket_errored(u64 websocket_id, i32 message) =|
websocket_closed(u64 websocket_id, u16 code, ByteString reason, bool clean) =|
websocket_ready_state_changed(u64 websocket_id, u32 ready_state) =|
websocket_subprotocol(u64 websocket_id, ByteString subprotocol) =|
websocket_certificate_requested(u64 websocket_id) =|
// Certificate requests
certificate_requested(u64 request_id) =|
estimated_cache_size(u64 cache_size_estimation_id, Requests::CacheSizes sizes) =|
}