Merge pull request #556 from lightpanda-io/mime-sniff-skip

browser: temporary ignore mime sniff
This commit is contained in:
Pierre Tachoire authored and GitHub committed 2025-04-22 18:55:57 +02:00
commit 4a696b4053
1 file changed
+9 -2
+9 -2
View File
@@ -441,8 +441,15 @@ pub const Page = struct {
if (content_type) |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()) {
try self.loadHTMLDoc(&response, mime.charset orelse "utf-8");