Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e14544ab
...
e14544abfae194c4b2061fe10824051cc0fe68dc
authored
2014-04-24 10:37:28 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #848 from franck34/master
Fix configureHttpAuth
2 parents
98021323
21277da8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
modules/casper.js
modules/casper.js
View file @
e14544a
...
...
@@ -498,7 +498,7 @@ Casper.prototype.clickLabel = function clickLabel(label, tag) {
*/
Casper
.
prototype
.
configureHttpAuth
=
function
configureHttpAuth
(
location
,
settings
)
{
"use strict"
;
var
username
,
password
,
httpAuthMatch
=
location
.
match
(
/^https
?
:
\/\/(
.+
)
:
(
.+
)
@/i
);
var
httpAuthMatch
=
location
.
match
(
/^https
?
:
\/\/(
.+
)
:
(
.+
)
@/i
);
this
.
checkStarted
();
if
(
httpAuthMatch
)
{
this
.
page
.
settings
.
userName
=
httpAuthMatch
[
1
];
...
...
@@ -509,8 +509,8 @@ Casper.prototype.configureHttpAuth = function configureHttpAuth(location, settin
}
else
{
return
;
}
this
.
emit
(
'http.auth'
,
username
,
password
);
this
.
log
(
"Setting HTTP authentication for user "
+
usern
ame
,
"info"
);
this
.
emit
(
'http.auth'
,
this
.
page
.
settings
.
userName
,
this
.
page
.
settings
.
password
);
this
.
log
(
"Setting HTTP authentication for user "
+
this
.
page
.
settings
.
userN
ame
,
"info"
);
return
this
;
};
...
...
Please
register
or
sign in
to post a comment