Directory permissions behavior changed?

mike mike503 at gmail.com
Fri Aug 8 12:57:18 MSD 2008


More investigation:

nginx-0.7.8/src/http/modules/ngx_http_index_module.c, line 137:

for (i = 0; i < ilcf->indices->nelts; i++) {

it shows the right number of nelts, but the for loop only cycles
through once. it needs to cycle through all nelts of them!

for example this is my code:


    for (i = 0; i < ilcf->indices->nelts; i++) {

            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, of.err,
                          ngx_open_file_n " MIKEMIKE: \"%s\" failed",
index[i].name.data);

            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, of.err,
                          ngx_open_file_n " MIKEMIKENUMBER: \"%d\"
failed", ilcf->indices->nelts);

and it shows the right number for MIKEMIKENUMBER - i changed my
config, restarted, and it shows the right number of "index" entries.

but the loop for some reason is being broken (it only prints out
testing for the first one)

i wish i knew C better; i can't find where the loop gets broken...

but it keeps matching these kind of statements:

if (index[i].lengths == NULL) {

if (index[i].values == NULL) {

and i wouldn't think those should be matched after the first
iteration. Igor i think this is something you could easily hack out in
a minute.





More information about the nginx mailing list