name/password were ignored after odd empty lines

This commit is contained in:
Igor Sysoev 2009-02-23 15:31:18 +00:00
parent 20018efe0f
commit 5336bd878b

View File

@ -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]) {