WrongUrl page implemented

main
Inga 🏳‍🌈 15 years ago
parent 11bf04bf9f
commit 6f698d0741
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      IISMainHandler/IISMainHandler.csproj
  3. 15
      IISMainHandler/handlers/WrongUrlHandler.cs
  4. 28
      templates/Full/WrongUrl.xslt

@ -92,6 +92,7 @@
<Compile Include="handlers\response\QuickLinkHandler.cs" /> <Compile Include="handlers\response\QuickLinkHandler.cs" />
<Compile Include="handlers\response\RedirectGetHandler.cs" /> <Compile Include="handlers\response\RedirectGetHandler.cs" />
<Compile Include="handlers\response\ReplyHandler.cs" /> <Compile Include="handlers\response\ReplyHandler.cs" />
<Compile Include="handlers\response\RobotsHandler.cs" />
<Compile Include="handlers\response\SettingsHandler.cs" /> <Compile Include="handlers\response\SettingsHandler.cs" />
<Compile Include="handlers\response\UploadHandler.cs" /> <Compile Include="handlers\response\UploadHandler.cs" />
<Compile Include="handlers\response\UploadListHandler.cs" /> <Compile Include="handlers\response\UploadListHandler.cs" />

@ -3,12 +3,21 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Web; using System.Web;
using System.Xml.Linq;
namespace FLocal.IISHandler.handlers { namespace FLocal.IISHandler.handlers {
class WrongUrlHandler : ISpecificHandler { class WrongUrlHandler : AbstractGetHandler {
public void Handle(WebContext context) { protected override string templateName {
throw new HttpException(400, "wrong url '" + context.httprequest.RawUrl + "'"); get {
return "WrongUrl.xslt";
}
}
protected override XElement[] getSpecificData(WebContext context) {
return new XElement[] {
new XElement("path", context.httprequest.Path)
};
} }
} }

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="elems\Main.xslt"/>
<xsl:template name="specificTitle">Íåâåðíûé àäðåñ</xsl:template>
<xsl:template name="specific">
<table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr>
<td>
<table cellpadding="3" cellspacing="1" width="100%" class="tableborders">
<tr>
<td class="tdheader">
<xsl:text>Íåâåðíûé àäðåñ</xsl:text>
</td>
</tr>
<tr class="darktable">
<td>
<xsl:text>Ââåä¸ííûé âàìè àäðåñ </xsl:text>
<xsl:value-of select="path"/>
<xsl:text> íå íàéäåí</xsl:text>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
Loading…
Cancel
Save