Commit 2ffa3112 2ffa31124fcbb8648f974465f0c761ef70d058ee by Nicolas Perriault

refs #137 - added a warning when trying to send custom request headers using phantom < 1.6

1 parent 5642b7cf
1 Subproject commit 716e1bcf1029468cbdf868fcd73fb0d40dbb7a95 1 Subproject commit de42a4e8a5aaa3906a26ae89b12d73c3a082f8c7
......
...@@ -828,6 +828,9 @@ Casper.prototype.open = function open(location, settings) { ...@@ -828,6 +828,9 @@ Casper.prototype.open = function open(location, settings) {
828 } 828 }
829 this.emit('open', this.requestUrl, settings); 829 this.emit('open', this.requestUrl, settings);
830 this.log(f('opening url: %s, HTTP %s', this.requestUrl, settings.method.toUpperCase()), "debug"); 830 this.log(f('opening url: %s, HTTP %s', this.requestUrl, settings.method.toUpperCase()), "debug");
831 if ('headers' in settings && phantom.version.minor < 6) {
832 this.warn('Custom headers in outgoing requests are supported in PhantomJS >= 1.6');
833 }
831 this.page.openUrl(this.requestUrl, { 834 this.page.openUrl(this.requestUrl, {
832 operation: settings.method, 835 operation: settings.method,
833 data: settings.data, 836 data: settings.data,
......