comparison src/core/ngx_file.c @ 517:dadfa78d2270 release-0.1.33

nginx-0.1.33-RELEASE import *) Bugfix: nginx could not be built with the --without-pcre parameter; the bug had appeared in 0.1.29. *) Bugfix: 3, 4, 7, and 8 the "proxy_set_header" directives in one level cause the bus fault on start up. *) Bugfix: the HTTP protocol was specified in the HTTPS redirects. *) Bugfix: if the "rewrite" directive used the captures inside the "if" directive, then the 500 error code was returned.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 23 May 2005 12:07:45 +0000
parents 9b8c906f6e63
children e48ebafc6939
comparison
equal deleted inserted replaced
516:ea9642a65514 517:dadfa78d2270
59 ngx_memcpy(file->name.data, path->name.data, path->name.len); 59 ngx_memcpy(file->name.data, path->name.data, path->name.len);
60 60
61 n = ngx_next_temp_number(0); 61 n = ngx_next_temp_number(0);
62 62
63 for ( ;; ) { 63 for ( ;; ) {
64 ngx_sprintf(file->name.data + path->name.len + 1 + path->len, 64 (void) ngx_sprintf(file->name.data + path->name.len + 1 + path->len,
65 "%0muA%Z", n); 65 "%0muA%Z", n);
66 66
67 ngx_create_hashed_filename(file, path); 67 ngx_create_hashed_filename(file, path);
68 68
69 #if 1 69 #if 1
70 file->fd = ngx_open_tempfile(file->name.data, persistent); 70 file->fd = ngx_open_tempfile(file->name.data, persistent);
121 121
122 122
123 void 123 void
124 ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path) 124 ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path)
125 { 125 {
126 ngx_uint_t i, name, pos, level; 126 size_t name, pos, level;
127 ngx_uint_t i;
127 128
128 name = file->name.len; 129 name = file->name.len;
129 pos = path->name.len + 1; 130 pos = path->name.len + 1;
130 131
131 file->name.data[path->name.len + path->len] = '/'; 132 file->name.data[path->name.len + path->len] = '/';
149 150
150 151
151 ngx_int_t 152 ngx_int_t
152 ngx_create_path(ngx_file_t *file, ngx_path_t *path) 153 ngx_create_path(ngx_file_t *file, ngx_path_t *path)
153 { 154 {
154 int i, pos; 155 size_t pos;
155 ngx_err_t err; 156 ngx_err_t err;
157 ngx_uint_t i;
156 158
157 pos = path->name.len; 159 pos = path->name.len;
158 160
159 for (i = 0; i < 3; i++) { 161 for (i = 0; i < 3; i++) {
160 if (path->level[i] == 0) { 162 if (path->level[i] == 0) {
342 path[i]->name.data); 344 path[i]->name.data);
343 return NGX_ERROR; 345 return NGX_ERROR;
344 } 346 }
345 } 347 }
346 348
347 if (user == (ngx_uid_t) -1) { 349 if (user == (ngx_uid_t) NGX_CONF_UNSET_UINT) {
348 continue; 350 continue;
349 } 351 }
350 352
351 #if !(NGX_WIN32) 353 #if !(NGX_WIN32)
352 354