1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 21:50:00 -05:00
This commit is contained in:
Divy Srivastava 2024-10-18 19:30:43 +05:30
parent cf6f921df5
commit bf15521314

View file

@ -565,12 +565,11 @@ function mapToCallback(context, callback, onError) {
if (headers && headers.length > 0) { if (headers && headers.length > 0) {
if (headers.length == 1) { if (headers.length == 1) {
if ( if (
inner.canInferContentType && !(inner.canInferContentType &&
headers[0][0] === "Content-Type" headers[0][0] === "Content-Type")
) { ) {
continue;
}
op_http_set_response_header(req, headers[0][0], headers[0][1]); op_http_set_response_header(req, headers[0][0], headers[0][1]);
}
} else { } else {
op_http_set_response_headers(req, headers); op_http_set_response_headers(req, headers);
} }