瀏覽代碼

Redownload files with the keep-alive option

Gaël Métais 9 年之前
父節點
當前提交
c20cacac99
共有 1 個文件被更改,包括 2 次插入0 次删除
  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,