Merge pull request #848 from franck34/master
Fix configureHttpAuth
Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -498,7 +498,7 @@ Casper.prototype.clickLabel = function clickLabel(label, tag) { | ... | @@ -498,7 +498,7 @@ Casper.prototype.clickLabel = function clickLabel(label, tag) { |
498 | */ | 498 | */ |
499 | Casper.prototype.configureHttpAuth = function configureHttpAuth(location, settings) { | 499 | Casper.prototype.configureHttpAuth = function configureHttpAuth(location, settings) { |
500 | "use strict"; | 500 | "use strict"; |
501 | var username, password, httpAuthMatch = location.match(/^https?:\/\/(.+):(.+)@/i); | 501 | var httpAuthMatch = location.match(/^https?:\/\/(.+):(.+)@/i); |
502 | this.checkStarted(); | 502 | this.checkStarted(); |
503 | if (httpAuthMatch) { | 503 | if (httpAuthMatch) { |
504 | this.page.settings.userName = httpAuthMatch[1]; | 504 | this.page.settings.userName = httpAuthMatch[1]; |
... | @@ -509,8 +509,8 @@ Casper.prototype.configureHttpAuth = function configureHttpAuth(location, settin | ... | @@ -509,8 +509,8 @@ Casper.prototype.configureHttpAuth = function configureHttpAuth(location, settin |
509 | } else { | 509 | } else { |
510 | return; | 510 | return; |
511 | } | 511 | } |
512 | this.emit('http.auth', username, password); | 512 | this.emit('http.auth', this.page.settings.userName, this.page.settings.password); |
513 | this.log("Setting HTTP authentication for user " + username, "info"); | 513 | this.log("Setting HTTP authentication for user " + this.page.settings.userName, "info"); |
514 | return this; | 514 | return this; |
515 | }; | 515 | }; |
516 | 516 | ... | ... |
-
Please register or sign in to post a comment