nginx-0.0.3-2004-04-19-20:36:08 import

This commit is contained in:
Igor Sysoev 2004-04-19 16:36:08 +00:00
parent 9bfb434d24
commit 978dabaf1f
2 changed files with 8 additions and 7 deletions

View File

@ -566,6 +566,10 @@ static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf)
ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module); ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module);
if (ecf->use != ngx_select_module.ctx_index) {
return NGX_CONF_OK;
}
/* disable warning: the default FD_SETSIZE is 1024U in FreeBSD 5.x */ /* disable warning: the default FD_SETSIZE is 1024U in FreeBSD 5.x */
if ((unsigned) ecf->connections > FD_SETSIZE) { if ((unsigned) ecf->connections > FD_SETSIZE) {

View File

@ -261,7 +261,7 @@ static int ngx_http_gzip_header_filter(ngx_http_request_t *r)
/* TODO: "text/html" -> custom types */ /* TODO: "text/html" -> custom types */
if (r->headers_out.content_type if (r->headers_out.content_type
&& ngx_strncasecmp(r->headers_out.content_type->value.data, && ngx_strncasecmp(r->headers_out.content_type->value.data,
"text/html", 5) != 0) "text/html", 9) != 0)
{ {
return ngx_http_next_header_filter(r); return ngx_http_next_header_filter(r);
} }
@ -365,22 +365,19 @@ static int ngx_http_gzip_proxied(ngx_http_request_t *r,
if (r->headers_out.cache_control) { if (r->headers_out.cache_control) {
if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_CACHE) if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_CACHE)
&& ngx_strstr(r->headers_out.cache_control->value.data, "no-cache") && ngx_strstr(r->headers_out.cache_control->value.data, "no-cache"))
== NULL)
{ {
return NGX_OK; return NGX_OK;
} }
if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_STORE) if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_STORE)
&& ngx_strstr(r->headers_out.cache_control->value.data, "no-store") && ngx_strstr(r->headers_out.cache_control->value.data, "no-store"))
== NULL)
{ {
return NGX_OK; return NGX_OK;
} }
if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_PRIVATE) if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_PRIVATE)
&& ngx_strstr(r->headers_out.cache_control->value.data, "private") && ngx_strstr(r->headers_out.cache_control->value.data, "private"))
== NULL)
{ {
return NGX_OK; return NGX_OK;
} }