|
@@ -45,6 +45,14 @@ var Redownload = function() {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ var proxy = null;
|
|
|
+ if (data.params && data.params.options && data.params.options.proxy) {
|
|
|
+ proxy = data.params.options.proxy;
|
|
|
+ if (proxy.indexOf('http:') === -1) {
|
|
|
+ proxy = 'http://' + proxy;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// Prevent a bug with the font analyzer on empty pages
|
|
|
var differentCharacters = '';
|
|
|
if (data.toolsResults.phantomas.offenders.differentCharacters && data.toolsResults.phantomas.offenders.differentCharacters.length > 0) {
|
|
@@ -55,7 +63,7 @@ var Redownload = function() {
|
|
|
var redownloadList = requestsList.map(function(entry) {
|
|
|
return function(callback) {
|
|
|
|
|
|
- redownloadEntry(entry, httpAuth)
|
|
|
+ redownloadEntry(entry, httpAuth, proxy)
|
|
|
|
|
|
.then(contentTypeChecker.checkContentType)
|
|
|
|
|
@@ -558,7 +566,7 @@ var Redownload = function() {
|
|
|
}
|
|
|
|
|
|
|
|
|
- function redownloadEntry(entry, httpAuth) {
|
|
|
+ function redownloadEntry(entry, httpAuth, proxy) {
|
|
|
var deferred = Q.defer();
|
|
|
|
|
|
function downloadError(message) {
|
|
@@ -610,7 +618,8 @@ var Redownload = function() {
|
|
|
method: entry.method,
|
|
|
url: entry.url,
|
|
|
headers: reqHeaders,
|
|
|
- timeout: REQUEST_TIMEOUT
|
|
|
+ timeout: REQUEST_TIMEOUT,
|
|
|
+ proxy: proxy
|
|
|
};
|
|
|
|
|
|
// Basic auth
|