Mercurial > hg > nginx
comparison src/http/modules/ngx_http_charset_filter.c @ 139:54307053f185
nginx-0.0.1-2003-10-07-19:30:05 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 07 Oct 2003 15:30:05 +0000 |
parents | b27548f540ad |
children | 46eb23d9471d |
comparison
equal
deleted
inserted
replaced
138:3b168e12bd2d | 139:54307053f185 |
---|---|
58 | 58 |
59 static int ngx_http_charset_header_filter(ngx_http_request_t *r) | 59 static int ngx_http_charset_header_filter(ngx_http_request_t *r) |
60 { | 60 { |
61 ngx_http_charset_loc_conf_t *lcf; | 61 ngx_http_charset_loc_conf_t *lcf; |
62 | 62 |
63 if (ngx_strncasecmp(r->headers_out.content_type->value.data, "text/", 5) | 63 if (r->headers_out.content_type == NULL |
64 != 0) { | 64 || ngx_strncasecmp(r->headers_out.content_type->value.data, |
65 "text/", 5) != 0 | |
66 || ngx_strstr(r->headers_out.content_type->value.data, "charset") | |
67 != NULL | |
68 ) | |
69 { | |
65 return next_header_filter(r); | 70 return next_header_filter(r); |
66 } | 71 } |
67 | 72 |
68 lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module); | 73 lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module); |
69 | 74 |