Merge pull request #3682 from lightpanda-io/ignore-invalid-mime

http: CDP ignore invalid content-type message
This commit is contained in:
Karl Seguin authored and GitHub committed 2026-09-30 07:02:26 +08:00
commit 55d06d87e6
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -1097,8 +1097,7 @@ pub const BrowserContext = struct {
// for well known content-type.
.must_encode = blk: {
if (msg.transfer.contentType()) |ct| {
const mime = try Mime.parse(ct);
const mime = Mime.parse(ct) catch break :blk true;
if (!mime.isText()) {
break :blk true;
}
+1 -1
View File
@@ -615,7 +615,7 @@ const ResponseWriter = struct {
{
const mime: Mime = blk: {
if (transfer.contentType()) |ct| {
break :blk try Mime.parse(ct);
break :blk Mime.parse(ct) catch .unknown;
}
break :blk .unknown;
};