mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-08 12:21:44 -04:00
Merge pull request #3682 from lightpanda-io/ignore-invalid-mime
http: CDP ignore invalid content-type message
This commit is contained in:
2 files changed
+2
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user