diff --git a/ZqUtils.Core/Helpers/HttpHelper.cs b/ZqUtils.Core/Helpers/HttpHelper.cs index df3230e..1521e26 100644 --- a/ZqUtils.Core/Helpers/HttpHelper.cs +++ b/ZqUtils.Core/Helpers/HttpHelper.cs @@ -988,16 +988,22 @@ public string RedirectUrl { var baseurl = Header["location"].ToString().Trim(); var locationurl = baseurl.ToLower(); + if (!string.IsNullOrEmpty(locationurl)) { var b = locationurl.StartsWith("http://") || locationurl.StartsWith("https://"); - if (!b) baseurl = new Uri(new Uri(ResponseUri), baseurl).AbsoluteUri; + if (!b) + baseurl = new Uri(new Uri(ResponseUri), baseurl).AbsoluteUri; } + return baseurl; } } } - catch { } + catch + { + } + return string.Empty; } }