1
0
Fork 0

Fixed xml output to correctly reference cslt stylesheet.

This commit is contained in:
Starbeamrainbowlabs 2016-07-06 20:18:14 +01:00
parent 29635af656
commit 381644604f
1 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ namespace GalleryShare
break;
case OutputFunction.DirectoryListing:
cycle.Response.ContentType = "text/xml";
cycle.Response.ContentType = "application/xml";
await sendDirectoryListing(cycle.Response.OutputStream, cycle.Request.RawUrl, requestedPath);
break;
@ -139,7 +139,7 @@ namespace GalleryShare
XmlWriter xmlData = XmlWriter.Create(outgoingData, writerSettings);
await xmlData.WriteStartDocumentAsync();
await xmlData.WriteProcessingInstructionAsync("xsl-stylesheet", "type=\"text/xsl\" href=\"/!Transform-DirListing.xslt\"");
await xmlData.WriteProcessingInstructionAsync("xml-stylesheet", "type=\"text/xsl\" href=\"/!Transform-DirListing.xslt\"");
await xmlData.WriteStartElementAsync(null, "DirectoryListing", null);
await xmlData.WriteElementStringAsync(null, "CurrentDirectory", null, rawUrl);
await xmlData.WriteStartElementAsync(null, "Contents", null);