Skip to content

Commit

Permalink
faster way to read content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Aug 22, 2022
1 parent 39dc989 commit 4b84090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bun.js/api/server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
var needs_content_type = true;
const content_type: MimeType = brk: {
if (response.body.init.headers) |headers_| {
if (headers_.get("content-type")) |content| {
if (headers_.fastGet(.ContentType)) |content| {
needs_content_type = false;
break :brk MimeType.init(content);
}
Expand Down

0 comments on commit 4b84090

Please sign in to comment.