Merge pull request #331 from lightpanda-io/continue-on-error
Some checks failed
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled

browser: don't stop processing page on error status code
This commit is contained in:
Pierre Tachoire
2024-12-13 17:41:34 +01:00
committed by GitHub

View File

@@ -276,18 +276,15 @@ pub const Page = struct {
const req = resp.req; const req = resp.req;
log.info("GET {any} {d}", .{ self.uri, req.response.status }); log.info("GET {any} {d}", .{ self.uri, @intFromEnum(req.response.status) });
// TODO handle redirection // TODO handle redirection
if (req.response.status != .ok) {
log.debug("{?} {d} {s}", .{ log.debug("{?} {d} {s}", .{
req.response.version, req.response.version,
req.response.status, @intFromEnum(req.response.status),
req.response.reason, req.response.reason,
// TODO log headers // TODO log headers
}); });
return error.BadStatusCode;
}
// TODO handle charset // TODO handle charset
// https://html.spec.whatwg.org/#content-type // https://html.spec.whatwg.org/#content-type