public CacheFilter ( Stream s, |
||
s | Stream | |
c | ||
Результат | HtmlAgilityPack |
public CacheFilter(Stream s, HttpContext c):base(s)
{
this.context = c;
Uri root = context.Request.Url;
RootUri = root;
string basePath = "/";
if (root.IsFile)
{
basePath = string.Join("", root.Segments.Take(root.Segments.Length - 1));
}
else
{
basePath = string.Join("", root.Segments);
}
UriBuilder rootBuilder = new UriBuilder(root.Scheme, root.Host, root.Port);
rootBuilder.Path = basePath;
BaseUri = rootBuilder.Uri;
}