diff --git a/lib/www-authenticate-patched/parsers.js b/lib/www-authenticate-patched/parsers.js index 7deb6fe6..acf54416 100644 --- a/lib/www-authenticate-patched/parsers.js +++ b/lib/www-authenticate-patched/parsers.js @@ -15,11 +15,10 @@ var ParseAuth= /(\w+)\s+(.*)/ // -> scheme, params function parse_params(header) { // This parser will definitely fail if there is more than one challenge - var tok, last_tok, _i, _len, key, value; + var tok, _i, _len, key, value; var state= 0; //0: token, var m= header.split(Separators) for (_i = 0, _len = m.length; _i < _len; _i++) { - last_tok= tok; tok = m[_i]; if (!tok.length) continue; switch (state) { @@ -67,7 +66,6 @@ function parse_params(header) { else { return 'Unexpected token ('+tok+') after '+value+'"'; } - continue; case 9: // expect commma if (',' != tok) return 'Comma expected after '+value; state= 0; diff --git a/lib/www-authenticate-patched/www-authenticate.js b/lib/www-authenticate-patched/www-authenticate.js index 739006b8..2069a5d8 100644 --- a/lib/www-authenticate-patched/www-authenticate.js +++ b/lib/www-authenticate-patched/www-authenticate.js @@ -91,7 +91,7 @@ var www_authenticator = function(username,password,options) } else { var qopa= qop.split(','); - var q, x, _i, _len; + var _i, _len; for (_i = 0, _len = qopa.length; _i < _len; _i++) { if ('auth' === qopa[_i]) { var opaque= auth_parms.opaque; @@ -123,10 +123,9 @@ var www_authenticator = function(username,password,options) }; return; } - return note_error('Server does not accept any supported quality of protection techniques.'); } + return note_error('Server does not accept any supported quality of protection techniques.'); } - break; default: return note_error("Unknown scheme"); }