Mercurial > hg > nginx-quic
diff src/http/modules/ngx_http_static_handler.c @ 13:2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 16 Sep 2002 15:01:44 +0000 |
parents | 4f3879d9b6f6 |
children | d7908993fdeb |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c @@ -65,7 +65,19 @@ int ngx_http_static_handler(ngx_http_req */ /* STUB */ - r->headers_out->content_type = "text/html"; + if (r->exten) { + if (strcasecmp(r->exten, "html") == 0) + r->headers_out->content_type = "text/html; charset=koi8-r"; + else if (strcasecmp(r->exten, "gif") == 0) + r->headers_out->content_type = "image/gif"; + else if (strcasecmp(r->exten, "jpg") == 0) + r->headers_out->content_type = "image/jpeg"; + else if (strcasecmp(r->exten, "pdf") == 0) + r->headers_out->content_type = "application/pdf"; + + } else { + r->headers_out->content_type = "text/html; charset=koi8-r"; + } /* STUB */ rc = ngx_http_header_filter(r);