Changeset 366
- Timestamp:
- 06/24/08 13:47:36 (5 months ago)
- Files:
-
- trunk/tools/tools/downloader.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tools/tools/downloader.d
r362 r366 102 102 static this() { New(download_callbacks); } 103 103 104 string download(string param, string *redirect=null) { 104 string download(string param, string *redirect=null, int maxredir = 16) { 105 if (!maxredir) throw new Exception("Maximal redirection level reached for "~param~"! Aborting."); 105 106 string url=param; 106 107 if (url=="") throw new Exception("URL empty"); … … 238 239 download_callbacks.add(loc, dg); 239 240 scope(exit) download_callbacks.remove(loc, dg); 240 res=download(loc ); return true;241 res=download(loc, redirect, maxredir-1); return true; 241 242 } 242 243 }
