Browse Source

Redownload files with the keep-alive option

Gaël Métais 9 years ago
parent
commit
c20cacac99
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/tools/redownload/redownload.js

+ 2 - 0
lib/tools/redownload/redownload.js

@@ -4,6 +4,7 @@
  *
  */
 
+/*jshint -W069 */
 
 var debug               = require('debug')('ylt:redownload');
 var Q                   = require('q');
@@ -460,6 +461,7 @@ var Redownload = function() {
         // Always add a gzip header before sending, in case the server listens to it
         var reqHeaders = entry.requestHeaders;
         reqHeaders['Accept-Encoding'] = 'gzip, deflate';
+        reqHeaders['Connection'] = 'keep-alive';
 
         var requestOptions = {
             method: entry.method,