@@ -36,7 +36,7 @@ namespace Rac.Tools
public static string ReplaceCssLinks(string css, Func<string, string> func)
{
- var links = FromCss(css).OrderByDescending(p => p.Length).Distinct().ToArray();
+ var links = FromCss(css).OrderByDescending(p => p.Length).Distinct().Where(s => string.IsNullOrWhiteSpace(s) == false).ToArray();
foreach (var link in links)
if (link != "//")
@@ -1,5 +1,6 @@
using Rac.Models;
using System.Net;
+using System;
namespace Rac.Tools
@@ -12,7 +13,7 @@ namespace Rac.Tools
var req = WebRequest.CreateHttp(url);
req.UserAgent = "RawArchiveCrawler";
- if (referer != null) req.Referer = referer;
+ if (referer != null) req.Referer = new Uri(referer).AbsoluteUri;
req.AllowAutoRedirect = false; //record redirections