Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
...@@ -220,10 +220,7 @@ HTTPRequest.prototype.Get=function(url, referer, base) { ...@@ -220,10 +220,7 @@ HTTPRequest.prototype.Get=function(url, referer, base) {
&& this.response_headers_parsed.Location.length && this.response_headers_parsed.Location.length
) { ) {
this.follow_redirects--; this.follow_redirects--;
const re = /([a-z]+:\/\/.+:{0,1}\d{0,5})\//i; return this.Get(this.response_headers_parsed.Location[0], this.url.url, this.url.url); // To-do: be less tired and think about referer,base
var loc = this.response_headers_parsed.Location[0];
if (loc.search(re) < 0) loc = url.match(re)[1] + loc; // Assumes 'url' will match 're', but if it doesn't you'll have other problems anyway
return this.Get(loc, url); // To-do: be less tired and think about referer,base
} }
return(this.body); return(this.body);
}; };
......