Improved loading performance even more by switching from XmlDocument to XmlReader. Also added more api improvements.

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-07-14 16:45:11 -04:00
parent 5f5f2838b1
commit 2e03cb0916
18 changed files with 652 additions and 404 deletions
+10 -1
View File
@@ -9,6 +9,14 @@ namespace MediaBrowser.Common.Net
public HttpListenerRequest Request { get; private set; }
public HttpListenerResponse Response { get; private set; }
public string LocalPath
{
get
{
return Request.Url.LocalPath;
}
}
public RequestContext(HttpListenerContext context)
{
Response = context.Response;
@@ -19,6 +27,8 @@ namespace MediaBrowser.Common.Net
{
Response.AddHeader("Access-Control-Allow-Origin", "*");
Response.KeepAlive = true;
foreach (var header in handler.Headers)
{
Response.AddHeader(header.Key, header.Value);
@@ -52,7 +62,6 @@ namespace MediaBrowser.Common.Net
{
CacheResponse(Response, cacheDuration, handler.LastDateModified);
}
handler.WriteStream(Response.OutputStream);
}
else