diff options
Diffstat (limited to 'src/http/modules/perl')
-rw-r--r-- | src/http/modules/perl/nginx.xs | 6 | ||||
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 8e287a6b2..53b6a9230 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -116,10 +116,8 @@ send_http_header(r, ...) } } else { - if (r->headers_out.content_type.len == 0) { - if (ngx_http_set_content_type(r) != NGX_OK) { - XSRETURN_EMPTY; - } + if (ngx_http_set_content_type(r) != NGX_OK) { + XSRETURN_EMPTY; } } diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index b3e117584..6f979c661 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -226,13 +226,6 @@ ngx_http_perl_handle_request(ngx_http_request_t *r) ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "perl handler"); - /* mod_perl's content handler assumes that content type was already set */ - - if (ngx_http_set_content_type(r) != NGX_OK) { - ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); - return; - } - ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); if (ctx == NULL) { |