Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
12:055ed05235ae | 13:2aba961a1d34 |
---|---|
63 /* | 63 /* |
64 r->headers_out->last_modified = ngx_file_mtime(r->fileinfo); | 64 r->headers_out->last_modified = ngx_file_mtime(r->fileinfo); |
65 */ | 65 */ |
66 | 66 |
67 /* STUB */ | 67 /* STUB */ |
68 r->headers_out->content_type = "text/html"; | 68 if (r->exten) { |
69 if (strcasecmp(r->exten, "html") == 0) | |
70 r->headers_out->content_type = "text/html; charset=koi8-r"; | |
71 else if (strcasecmp(r->exten, "gif") == 0) | |
72 r->headers_out->content_type = "image/gif"; | |
73 else if (strcasecmp(r->exten, "jpg") == 0) | |
74 r->headers_out->content_type = "image/jpeg"; | |
75 else if (strcasecmp(r->exten, "pdf") == 0) | |
76 r->headers_out->content_type = "application/pdf"; | |
77 | |
78 } else { | |
79 r->headers_out->content_type = "text/html; charset=koi8-r"; | |
80 } | |
69 | 81 |
70 /* STUB */ | 82 /* STUB */ |
71 rc = ngx_http_header_filter(r); | 83 rc = ngx_http_header_filter(r); |
72 /* | 84 /* |
73 rc = ngx_send_http_header(r->headers_out); | 85 rc = ngx_send_http_header(r->headers_out); |