We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba6701d commit 1d97d61Copy full SHA for 1d97d61
src/browser/browser.zig
@@ -395,11 +395,15 @@ pub const Page = struct {
395
396
log.info("GET {any} {d}", .{ self.uri, header.status });
397
398
- const ct = header.get("content-type") orelse {
399
- // no content type in HTTP headers.
400
- // TODO try to sniff mime type from the body.
401
- log.info("no content-type HTTP header", .{});
402
- return;
+ const ct = blk: {
+ break :blk header.get("content-type") orelse {
+ // no content type in HTTP headers.
+ // TODO try to sniff mime type from the body.
+ log.info("no content-type HTTP header", .{});
403
+
404
+ // Assume it's HTML for now.
405
+ break :blk "text/html; charset=utf-8";
406
+ };
407
};
408
409
log.debug("header content-type: {s}", .{ct});
0 commit comments