Merge pull request #556 from lightpanda-io/mime-sniff-skip
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled

browser: temporary ignore mime sniff
This commit is contained in:
Pierre Tachoire
2025-04-22 18:55:57 +02:00
committed by GitHub

View File

@@ -441,8 +441,15 @@ pub const Page = struct {
if (content_type) |ct| { if (content_type) |ct| {
break :blk try Mime.parse(arena, ct); break :blk try Mime.parse(arena, ct);
} }
break :blk Mime.sniff(try response.peek());
} orelse .unknown; // FIX-ME: we have a bug with response.peek()
//break :blk Mime.sniff(try response.peek());
break :blk Mime{
.content_type = .{ .text_html = {} },
.charset = "utf-8",
};
};
if (mime.isHTML()) { if (mime.isHTML()) {
try self.loadHTMLDoc(&response, mime.charset orelse "utf-8"); try self.loadHTMLDoc(&response, mime.charset orelse "utf-8");