comparison src/http/modules/ngx_http_gzip_filter.c @ 321:32847588a82a

nginx-0.0.3-2004-04-19-20:36:08 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 19 Apr 2004 16:36:08 +0000
parents d621239c30f7
children ab2f8c9a2a45
comparison
equal deleted inserted replaced
320:d621239c30f7 321:32847588a82a
259 } 259 }
260 260
261 /* TODO: "text/html" -> custom types */ 261 /* TODO: "text/html" -> custom types */
262 if (r->headers_out.content_type 262 if (r->headers_out.content_type
263 && ngx_strncasecmp(r->headers_out.content_type->value.data, 263 && ngx_strncasecmp(r->headers_out.content_type->value.data,
264 "text/html", 5) != 0) 264 "text/html", 9) != 0)
265 { 265 {
266 return ngx_http_next_header_filter(r); 266 return ngx_http_next_header_filter(r);
267 } 267 }
268 268
269 269
363 } 363 }
364 364
365 if (r->headers_out.cache_control) { 365 if (r->headers_out.cache_control) {
366 366
367 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_CACHE) 367 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_CACHE)
368 && ngx_strstr(r->headers_out.cache_control->value.data, "no-cache") 368 && ngx_strstr(r->headers_out.cache_control->value.data, "no-cache"))
369 == NULL)
370 { 369 {
371 return NGX_OK; 370 return NGX_OK;
372 } 371 }
373 372
374 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_STORE) 373 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_NO_STORE)
375 && ngx_strstr(r->headers_out.cache_control->value.data, "no-store") 374 && ngx_strstr(r->headers_out.cache_control->value.data, "no-store"))
376 == NULL)
377 { 375 {
378 return NGX_OK; 376 return NGX_OK;
379 } 377 }
380 378
381 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_PRIVATE) 379 if ((conf->proxied & NGX_HTTP_GZIP_PROXIED_PRIVATE)
382 && ngx_strstr(r->headers_out.cache_control->value.data, "private") 380 && ngx_strstr(r->headers_out.cache_control->value.data, "private"))
383 == NULL)
384 { 381 {
385 return NGX_OK; 382 return NGX_OK;
386 } 383 }
387 384
388 return NGX_DECLINED; 385 return NGX_DECLINED;