aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r--nginx/ngx_http_js_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c
index 8cb0173c..a73c2d24 100644
--- a/nginx/ngx_http_js_module.c
+++ b/nginx/ngx_http_js_module.c
@@ -1035,6 +1035,10 @@ ngx_http_js_ext_send_header(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs,
return NJS_ERROR;
}
+ if (ngx_http_set_content_type(r) != NGX_OK) {
+ return NJS_ERROR;
+ }
+
if (ngx_http_send_header(r) == NGX_ERROR) {
return NJS_ERROR;
}