mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Implement file: protocol support for load_unbuffered()
Preparation work before enabling unbuffered fetching by default.
This commit is contained in:
committed by
Tim Flynn
parent
fa46efae48
commit
2fd7b70784
Notes:
github-actions[bot]
2025-11-20 11:31:19 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/2fd7b70784c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6839 Reviewed-by: https://github.com/trflynn89 ✅
@@ -14,6 +14,7 @@
|
||||
#include <LibGC/Function.h>
|
||||
#include <LibHTTP/HeaderMap.h>
|
||||
#include <LibRequests/Forward.h>
|
||||
#include <LibRequests/RequestTimingInfo.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Loader/UserAgent.h>
|
||||
@@ -72,6 +73,14 @@ public:
|
||||
private:
|
||||
explicit ResourceLoader(GC::Heap&, NonnullRefPtr<Requests::RequestClient>);
|
||||
|
||||
struct FileLoadResult {
|
||||
ReadonlyBytes data;
|
||||
HTTP::HeaderMap response_headers;
|
||||
Requests::RequestTimingInfo timing_info;
|
||||
};
|
||||
template<typename FileHandler, typename ErrorHandler>
|
||||
void handle_file_load_request(LoadRequest& request, FileHandler on_file, ErrorHandler on_error);
|
||||
|
||||
RefPtr<Requests::Request> start_network_request(LoadRequest const&);
|
||||
void handle_network_response_headers(LoadRequest const&, HTTP::HeaderMap const&);
|
||||
void finish_network_request(NonnullRefPtr<Requests::Request>);
|
||||
|
||||
Reference in New Issue
Block a user