Files
ladybird/Services/RequestServer/RequestClient.ipc
Timothy Flynn 4ad800b594 RequestServer: Use correct request map for stale-while-revalidate cookie
When we request the HTTP cookie for a SWR request, we were providing the
cookie to the standard request corresponding to the SWR request's ID.
This had two effects:

1. The SWR request would never finish.
2. If the corresponding standard request happened to be a connect-only
   request, this would result in a crash as we were expecting it to have
   gone through the normal fetch process.

This was seen on some articles on news.google.com.
2026-04-13 19:43:13 -04:00

31 lines
1.4 KiB
Plaintext

#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_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) =|
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) =|
}