mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Implement file: protocol support for load_unbuffered()
Preparation work before enabling unbuffered fetching by default.
This commit is contained in:
parent
fa46efae48
commit
2fd7b70784
Notes:
github-actions[bot]
2025-11-20 11:31:19 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 2fd7b70784
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6839
Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 109 additions and 67 deletions
|
|
@ -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>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue