Redownload files with the keep-alive option

This commit is contained in:
Gaël Métais
2016-07-11 23:24:14 +08:00
parent decfc5823d
commit c20cacac99
+2
View File
@@ -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,