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
db868022
...
db86802213629502bd07196b801972c02d5b34a8
authored
2011-12-22 14:49:33 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed missing check for Casper.options.httpStatusHandlers values
1 parent
dbeb1a41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
lib/utils.js
lib/utils.js
View file @
db86802
...
...
@@ -125,8 +125,10 @@ function createPage(casper) {
}
if
(
resource
.
url
===
casper
.
requestUrl
&&
resource
.
stage
===
"start"
)
{
casper
.
currentHTTPStatus
=
resource
.
status
;
if
(
isType
(
casper
.
options
.
httpStatusHandlers
,
"object"
)
&&
resource
.
status
in
casper
.
options
.
httpStatusHandlers
)
{
casper
.
options
.
httpStatusHandlers
[
resource
.
status
](
casper
,
resource
);
if
(
isType
(
casper
.
options
.
httpStatusHandlers
,
"object"
)
&&
resource
.
status
in
casper
.
options
.
httpStatusHandlers
&&
isType
(
casper
.
options
.
httpStatusHandlers
[
resource
.
status
],
"function"
))
{
casper
.
options
.
httpStatusHandlers
[
resource
.
status
].
call
(
casper
,
casper
,
resource
);
}
casper
.
currentUrl
=
resource
.
url
;
}
...
...
@@ -228,7 +230,7 @@ function isWebPage(what) {
function
mergeObjects
(
obj1
,
obj2
)
{
for
(
var
p
in
obj2
)
{
try
{
if
(
obj2
[
p
].
constructor
==
Object
)
{
if
(
obj2
[
p
].
constructor
==
=
Object
)
{
obj1
[
p
]
=
mergeObjects
(
obj1
[
p
],
obj2
[
p
]);
}
else
{
obj1
[
p
]
=
obj2
[
p
];
...
...
Please
register
or
sign in
to post a comment