Commit d6c11e45 d6c11e45bafb0c01cdc5a584942bef06eb9365f9 by Chris Lorenzo

Pass a copy of the object rather than a reference so clientutils cant modify casper.options

1 parent 9211f91f
......@@ -455,7 +455,7 @@ Casper.prototype.die = function die(message, status) {
*/
Casper.prototype.download = function download(url, targetPath, method, data) {
"use strict";
var cu = require('clientutils').create(this.options);
var cu = require('clientutils').create(utils.mergeObjects({}, this.options));
try {
fs.write(targetPath, cu.decode(this.base64encode(url, method, data)), 'wb');
this.emit('downloaded.file', targetPath);
......