~ubuntu-branches/debian/squeeze/nginx/squeeze

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_gzip_static_module.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-11-08 09:53:46 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20091108095346-yt4eypw2l176tl53
Tags: 0.7.63-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
    gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module);
97
97
 
98
 
    if (!gzcf->enable || ngx_http_gzip_ok(r) != NGX_OK) {
 
98
    if (!gzcf->enable) {
 
99
        return NGX_DECLINED;
 
100
    }
 
101
 
 
102
    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
103
 
 
104
    if (clcf->gzip_vary && ngx_http_gzip_ok(r) != NGX_OK) {
99
105
        return NGX_DECLINED;
100
106
    }
101
107
 
116
122
    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
117
123
                   "http filename: \"%s\"", path.data);
118
124
 
119
 
    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
120
 
 
121
125
    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
122
126
 
123
127
    of.directio = clcf->directio;
138
142
        case NGX_ENOTDIR:
139
143
        case NGX_ENAMETOOLONG:
140
144
 
 
145
            r->gzip = 0;
141
146
            return NGX_DECLINED;
142
147
 
143
148
        case NGX_EACCES:
251
256
 
252
257
    conf = ngx_palloc(cf->pool, sizeof(ngx_http_gzip_static_conf_t));
253
258
    if (conf == NULL) {
254
 
        return NGX_CONF_ERROR;
 
259
        return NULL;
255
260
    }
256
261
 
257
262
    conf->enable = NGX_CONF_UNSET;