mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +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:
committed by
Andreas Kling
parent
2303142386
commit
32299e74cb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user