mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Make CSS font loader tolerate WPT web server shenanigans
The web server for WPT has a tendency to just disconnect after sending us a resource. This makes curl think an error occurred, but it's actually still recoverable and we have the data. So instead of just bailing, do what we already do for other kinds of resources and try to parse the data we got. If it works out, great! It would be nice to solve this in the networking layer instead, but I'll leave that as an exercise for our future selves.
This commit is contained in:
parent
2303142386
commit
32299e74cb
Notes:
github-actions[bot]
2024-09-21 17:21:21 +00:00
Author: https://github.com/awesomekling
Commit: 32299e74cb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1473
5 changed files with 32 additions and 16 deletions
|
@ -121,8 +121,8 @@ RefPtr<Resource> ResourceLoader::load_resource(Resource::Type type, LoadRequest&
|
|||
[=](auto data, auto& headers, auto status_code) {
|
||||
const_cast<Resource&>(*resource).did_load({}, data, headers, status_code);
|
||||
},
|
||||
[=](auto& error, auto status_code, auto, auto) {
|
||||
const_cast<Resource&>(*resource).did_fail({}, error, status_code);
|
||||
[=](auto& error, auto status_code, auto data, auto& headers) {
|
||||
const_cast<Resource&>(*resource).did_fail({}, error, data, headers, status_code);
|
||||
});
|
||||
|
||||
return resource;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue