@@ -108,10 +108,10 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
108
108
#if (NGX_HTTP_GZIP)
109
109
bool gzip_signature_mismatch = false ;
110
110
bool other_signature_mismatch = false ;
111
- for (int m = 0 ; ngx_modules [m] != NULL ; m++) {
112
- if (ngx_modules [m]->commands != NULL ) {
113
- for (int c = 0 ; ngx_modules [m]->commands [c].name .len ; c++) {
114
- ngx_command_t * current_command =& ngx_modules [m]->commands [c];
111
+ for (int m = 0 ; cf-> cycle -> modules [m] != NULL ; m++) {
112
+ if (cf-> cycle -> modules [m]->commands != NULL ) {
113
+ for (int c = 0 ; cf-> cycle -> modules [m]->commands [c].name .len ; c++) {
114
+ ngx_command_t * current_command =& cf-> cycle -> modules [m]->commands [c];
115
115
116
116
// We look for the gzip command, and the exact signature we trust
117
117
// this means configured as an config location offset
@@ -124,7 +124,7 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
124
124
if (IsNgxFlagCommand (current_command)) {
125
125
current_command->set = ngx_gzip_redirect_conf_set_flag_slot;
126
126
gzip_command_.command_ = current_command;
127
- gzip_command_.module_ = ngx_modules [m];
127
+ gzip_command_.module_ = cf-> cycle -> modules [m];
128
128
enabled_ = 1 ;
129
129
} else {
130
130
ngx_conf_log_error (
@@ -139,7 +139,7 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
139
139
if (IsNgxEnumCommand (current_command)) {
140
140
current_command->set = ngx_gzip_redirect_conf_set_enum_slot;
141
141
gzip_http_version_command_.command_ = current_command;
142
- gzip_http_version_command_.module_ = ngx_modules [m];
142
+ gzip_http_version_command_.module_ = cf-> cycle -> modules [m];
143
143
} else {
144
144
ngx_conf_log_error (
145
145
NGX_LOG_WARN, cf, 0 ,
@@ -153,7 +153,7 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
153
153
if (IsNgxBitmaskCommand (current_command)) {
154
154
current_command->set = ngx_gzip_redirect_conf_set_bitmask_slot;
155
155
gzip_proxied_command_.command_ = current_command;
156
- gzip_proxied_command_.module_ = ngx_modules [m];
156
+ gzip_proxied_command_.module_ = cf-> cycle -> modules [m];
157
157
} else {
158
158
ngx_conf_log_error (
159
159
NGX_LOG_WARN, cf, 0 ,
@@ -167,7 +167,7 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
167
167
if (IsNgxHttpTypesCommand (current_command)) {
168
168
current_command->set = ngx_gzip_redirect_http_types_slot;
169
169
gzip_http_types_command_.command_ = current_command;
170
- gzip_http_types_command_.module_ = ngx_modules [m];
170
+ gzip_http_types_command_.module_ = cf-> cycle -> modules [m];
171
171
} else {
172
172
ngx_conf_log_error (
173
173
NGX_LOG_WARN, cf, 0 ,
@@ -181,7 +181,7 @@ void NgxGZipSetter::Init(ngx_conf_t* cf) {
181
181
if (IsNgxFlagCommand (current_command)) {
182
182
current_command->set = ngx_gzip_redirect_conf_set_flag_slot;
183
183
gzip_vary_command_.command_ = current_command;
184
- gzip_vary_command_.module_ = ngx_modules [m];
184
+ gzip_vary_command_.module_ = cf-> cycle -> modules [m];
185
185
} else {
186
186
ngx_conf_log_error (
187
187
NGX_LOG_WARN, cf, 0 ,
0 commit comments