From: Igor Sysoev Date: Mon, 23 Feb 2009 15:31:18 +0000 (+0000) Subject: name/password were ignored after odd empty lines X-Git-Tag: release-0.7.38~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=5336bd878b5addd9ef11ca8b63756ee1679393bc;p=nginx.git name/password were ignored after odd empty lines --- diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index fe9102287..1c2333990 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -176,9 +176,16 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r) switch (state) { case sw_login: - if (login == 0 && buf[i] == '#') { - state = sw_skip; - break; + if (login == 0) { + + if (buf[i] == '#' || buf[i] == CR) { + state = sw_skip; + break; + } + + if (buf[i] == LF) { + break; + } } if (buf[i] != r->headers_in.user.data[login]) {