browser: temporary ignore mime sniff

This commit is contained in:
Pierre Tachoire
2025-04-22 18:47:52 +02:00
parent 5a08c92d02
commit 0b2c4679fd

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");