mod_autoindex
Igor Sysoev
is at rambler-co.ru
Tue Sep 27 13:06:45 MSD 2005
Патч для убирания дырок.
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
--- src/http/modules/ngx_http_autoindex_module.c Thu Sep 8 18:51:52 2005
+++ src/http/modules/ngx_http_autoindex_module.c Tue Sep 27 13:02:57 2005
@@ -468,7 +468,8 @@
} else {
if (entry[i].dir) {
- b->last = ngx_cpymem(b->last, " -", sizeof(" -") - 1);
+ b->last = ngx_cpymem(b->last, " -",
+ sizeof(" -") - 1);
} else {
length = entry[i].size;
@@ -498,13 +499,14 @@
} else {
size = (ngx_int_t) length;
- scale = ' ';
+ scale = '\0';
}
- b->last = ngx_sprintf(b->last, "%6i", size);
+ if (scale) {
+ b->last = ngx_sprintf(b->last, "%6i%c", size, scale);
- if (scale != ' ') {
- *b->last++ = scale;
+ } else {
+ b->last = ngx_sprintf(b->last, " %6i", size);
}
}
}
More information about the nginx-ru
mailing list