Improved loading performance even more by switching from XmlDocument to XmlReader. Also added more api improvements.
This commit is contained in:
parent
5f5f2838b1
commit
2e03cb0916
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user