comparison src/core/ngx_string.c @ 3433:6b8284fc958d stable-0.7

merge r3201, r3204, r3411: ngx_http_autoindex_module fixes: *) reset cached dirent.d_type after stat() this fixes slash after link to a directory in ngx_http_autoindex_module; *) use cached dirent.d_type as hint on all systems the issues has been introduced in r2235 *) fix ngx_utf8_cpystrn(): it did not fully copy utf-8 string
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 14:52:25 +0000
parents 616ff375a68f
children a79d2ad7a2d8
comparison
equal deleted inserted replaced
3432:20871c5e1d5d 3433:6b8284fc958d
1236 if (ngx_utf8_decode(&next, len) > 0x10ffff) { 1236 if (ngx_utf8_decode(&next, len) > 0x10ffff) {
1237 /* invalid UTF-8 */ 1237 /* invalid UTF-8 */
1238 break; 1238 break;
1239 } 1239 }
1240 1240
1241 len--;
1242
1243 while (src < next) { 1241 while (src < next) {
1244 *++dst = *++src; 1242 *dst++ = *src++;
1245 len--; 1243 len--;
1246 } 1244 }
1247 } 1245 }
1248 1246
1249 *dst = '\0'; 1247 *dst = '\0';