tacoss / grunt-nightwatch

Run your Nightwatch.js tests with Grunt
50 stars 22 forks source link

Downloading from URL with port in it is broken #48

Closed sruffing closed 9 years ago

sruffing commented 9 years ago

Download.js file should be updated to use the hostname and port, rather than just the URL.host. If the jar_url is configured to point to http://somesite.com:8888, then the URL will think the domain name for the machine is somesite.com:8888 instead of just somesite.com.

/// BAD CODE
req = http.request({ hostname: URL.host, method: 'GET', path: URL.path, agent: false }, function(res) {

/// GOOD CODE
req = http.request({ hostname: URL.hostname, port: URL.port, method: 'GET', path: URL.path, agent: false }, function(res) {

The workaround is to download the file yourself and use the jar_path configuration to point to your download.