Skip to content

Commit

Permalink
格式化代码;
Browse files Browse the repository at this point in the history
  • Loading branch information
zqlovejyc committed Jan 23, 2021
1 parent 21de5a4 commit c05285a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ZqUtils.Core/Helpers/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c05285a

Please sign in to comment.