Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_static_handler.c @ 19:d7908993fdeb
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 02 Dec 2002 16:09:40 +0000 |
parents | 2aba961a1d34 |
children | 77c7629a2627 |
comparison
equal
deleted
inserted
replaced
18:72ad26c77d2d | 19:d7908993fdeb |
---|---|
56 | 56 |
57 /* close fd */ | 57 /* close fd */ |
58 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 58 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
59 } | 59 } |
60 | 60 |
61 r->headers_out->status = NGX_HTTP_OK; | 61 r->headers_out.status = NGX_HTTP_OK; |
62 r->headers_out->content_length = ngx_file_size(r->fileinfo); | 62 r->headers_out.content_length = ngx_file_size(r->fileinfo); |
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 if (r->exten) { | 68 if (r->exten) { |
69 if (strcasecmp(r->exten, "html") == 0) | 69 if (strcasecmp(r->exten, "html") == 0) |
70 r->headers_out->content_type = "text/html; charset=koi8-r"; | 70 r->headers_out.content_type = "text/html; charset=koi8-r"; |
71 else if (strcasecmp(r->exten, "gif") == 0) | 71 else if (strcasecmp(r->exten, "gif") == 0) |
72 r->headers_out->content_type = "image/gif"; | 72 r->headers_out.content_type = "image/gif"; |
73 else if (strcasecmp(r->exten, "jpg") == 0) | 73 else if (strcasecmp(r->exten, "jpg") == 0) |
74 r->headers_out->content_type = "image/jpeg"; | 74 r->headers_out.content_type = "image/jpeg"; |
75 else if (strcasecmp(r->exten, "pdf") == 0) | 75 else if (strcasecmp(r->exten, "pdf") == 0) |
76 r->headers_out->content_type = "application/pdf"; | 76 r->headers_out.content_type = "application/pdf"; |
77 | 77 |
78 } else { | 78 } else { |
79 r->headers_out->content_type = "text/html; charset=koi8-r"; | 79 r->headers_out.content_type = "text/html; charset=koi8-r"; |
80 } | 80 } |
81 | 81 |
82 /* STUB */ | 82 /* STUB */ |
83 rc = ngx_http_header_filter(r); | 83 rc = ngx_http_header_filter(r); |
84 /* | 84 /* |