comparison src/http/modules/ngx_http_auth_basic_module.c @ 262:e0b1d0a6c629 NGINX_0_5_1

nginx 0.5.1 *) Bugfix: the "post_action" directive might not run after a unsuccessful completion of a request. *) Workaround: for Eudora for Mac; bug appeared in 0.4.11. Thanks to Bron Gondwana. *) Bugfix: if the "upstream" name was used in the "fastcgi_pass", then the message "no port in upstream" was issued; bug appeared in 0.5.0. *) Bugfix: if the "proxy_pass" and "fastcgi_pass" directives used the same servers but different ports, then these directives uses the first described port; bug appeared in 0.5.0. *) Bugfix: if the "proxy_pass" and "fastcgi_pass" directives used the unix domain sockets, then these directives used first described socket; bug appeared in 0.5.0. *) Bugfix: ngx_http_auth_basic_module ignored the user if it was in the last line in the password file and there was no the carriage return, the line feed, or the ":" symbol after the password. *) Bugfix: the $upstream_response_time variable might be equal to "0.000", although response time was more than 1 millisecond.
author Igor Sysoev <http://sysoev.ru>
date Mon, 11 Dec 2006 00:00:00 +0300
parents 38e7b94d63ac
children c5c2b2883984
comparison
equal deleted inserted replaced
261:e6ae240d5952 262:e0b1d0a6c629
152 login = 0; 152 login = 0;
153 left = 0; 153 left = 0;
154 offset = 0; 154 offset = 0;
155 155
156 for ( ;; ) { 156 for ( ;; ) {
157 i = left;
158
157 n = ngx_read_file(&file, buf + left, NGX_HTTP_AUTH_BUF_SIZE - left, 159 n = ngx_read_file(&file, buf + left, NGX_HTTP_AUTH_BUF_SIZE - left,
158 offset); 160 offset);
159 161
160 if (n == NGX_ERROR) { 162 if (n == NGX_ERROR) {
161 ngx_http_auth_basic_close(&file); 163 ngx_http_auth_basic_close(&file);
226 offset += n; 228 offset += n;
227 } 229 }
228 230
229 ngx_http_auth_basic_close(&file); 231 ngx_http_auth_basic_close(&file);
230 232
233 if (state == sw_passwd) {
234 pwd.len = i - passwd;
235 pwd.data = ngx_palloc(r->pool, pwd.len + 1);
236 if (pwd.data == NULL) {
237 return NGX_HTTP_INTERNAL_SERVER_ERROR;
238 }
239
240 ngx_cpystrn(pwd.data, &buf[passwd], pwd.len + 1);
241
242 return ngx_http_auth_basic_crypt_handler(r, NULL, &pwd, &alcf->realm);
243 }
244
231 return ngx_http_auth_basic_set_realm(r, &alcf->realm); 245 return ngx_http_auth_basic_set_realm(r, &alcf->realm);
232 } 246 }
233 247
234 248
235 static ngx_int_t 249 static ngx_int_t