1
0
Fork 0
mirror of https://gitlab.com/sbrl/GalleryShare.git synced 2018-06-12 22:45:16 +00:00

Fix logging an xslt file returning.

This commit is contained in:
Starbeamrainbowlabs 2016-07-06 11:22:58 +01:00
parent 50bf2ff143
commit 37dea995e9

View file

@ -65,8 +65,11 @@ namespace GalleryShare
Console.WriteLine(resName);*/
cycle.Response.ContentType = "text/xsl";
byte[] xsltData = await Utilities.GetEmbeddedResourceContent(@"GalleryShare.XSLT.DirectoryListing.xslt");
cycle.Response.OutputStream.WriteAsync(xsltData, 0, xsltData.Length);
await cycle.Response.OutputStream.WriteAsync(xsltData, 0, xsltData.Length);
logCycle(cycle);
cycle.Response.Close();
return;
}
string requestedPath = Path.GetFullPath(Path.Combine(servingDirectory, "." + cycle.Request.RawUrl));
@ -125,10 +128,10 @@ namespace GalleryShare
await xmlData.FlushAsync();
}
logCycle(cycle);
responseData.Close();
cycle.Response.Close();
logCycle(cycle);
}
private async Task sendMessage(HttpListenerContext cycle, int statusCode, string message, params object[] paramObjects)