diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt
index a0e999a..24888be 100644
--- a/Builder/IISMainHandler/build.txt
+++ b/Builder/IISMainHandler/build.txt
@@ -1 +1 @@
-860
\ No newline at end of file
+862
\ No newline at end of file
diff --git a/IISMainHandler/IISMainHandler.csproj b/IISMainHandler/IISMainHandler.csproj
index 8a280f3..5bc0c47 100644
--- a/IISMainHandler/IISMainHandler.csproj
+++ b/IISMainHandler/IISMainHandler.csproj
@@ -50,6 +50,7 @@
+
diff --git a/IISMainHandler/WebContext.cs b/IISMainHandler/WebContext.cs
index 39ce8bb..1a8c3b9 100644
--- a/IISMainHandler/WebContext.cs
+++ b/IISMainHandler/WebContext.cs
@@ -51,11 +51,7 @@ namespace FLocal.IISHandler {
}
}
- public designs.IDesign design {
- get {
- return new designs.Classic();
- }
- }
+ public readonly designs.IDesign design;
public override string formatDateTime(DateTime dateTime) {
return dateTime.ToString();
@@ -109,11 +105,24 @@ namespace FLocal.IISHandler {
} else {
this.userSettings = new AnonymousUserSettings();
}
+
+ switch(this.httprequest.Url.Port % 1000) {
+ case 445:
+ this.design = new designs.Raw();
+ break;
+ case 447:
+ this.design = new designs.Lite();
+ break;
+ case 443:
+ default:
+ this.design = new designs.Classic();
+ break;
+ }
}
public string Transform(string templateName, System.Xml.Linq.XDocument data) {
//TODO: this should work according to design!
- return TemplateEngine.Compile(this.design.fsname + this.config.DirSeparator + templateName, data);
+ return TemplateEngine.Compile(this.design.GetFSName(templateName), data);
}
public XElement exportSession() {
diff --git a/IISMainHandler/designs/Classic.cs b/IISMainHandler/designs/Classic.cs
index cb2d3d3..3bed8d2 100644
--- a/IISMainHandler/designs/Classic.cs
+++ b/IISMainHandler/designs/Classic.cs
@@ -5,10 +5,9 @@ using System.Text;
namespace FLocal.IISHandler.designs {
class Classic : IDesign {
- public string fsname {
- get {
- return "Full";
- }
+
+ public string GetFSName(string template) {
+ return System.IO.Path.Combine("Full", template);
}
string FLocal.Common.IOutputParams.preprocessBodyIntermediate(string bodyIntermediate) {
diff --git a/IISMainHandler/designs/IDesign.cs b/IISMainHandler/designs/IDesign.cs
index e5f7ee3..fb28876 100644
--- a/IISMainHandler/designs/IDesign.cs
+++ b/IISMainHandler/designs/IDesign.cs
@@ -6,9 +6,7 @@ using System.Text;
namespace FLocal.IISHandler.designs {
interface IDesign : Common.IOutputParams {
- string fsname {
- get;
- }
+ string GetFSName(string template);
}
}
diff --git a/IISMainHandler/designs/Lite.cs b/IISMainHandler/designs/Lite.cs
index 93b6625..0a988e2 100644
--- a/IISMainHandler/designs/Lite.cs
+++ b/IISMainHandler/designs/Lite.cs
@@ -5,10 +5,9 @@ using System.Text;
namespace FLocal.IISHandler.designs {
class Lite : IDesign {
- public string fsname {
- get {
- return "Lite";
- }
+
+ public string GetFSName(string template) {
+ return System.IO.Path.Combine("Lite", template);
}
string FLocal.Common.IOutputParams.preprocessBodyIntermediate(string bodyIntermediate) {
diff --git a/IISMainHandler/designs/Raw.cs b/IISMainHandler/designs/Raw.cs
new file mode 100644
index 0000000..52e7c73
--- /dev/null
+++ b/IISMainHandler/designs/Raw.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FLocal.IISHandler.designs {
+ class Raw : IDesign {
+
+ public string GetFSName(string template) {
+ return "copy.xslt";
+ }
+
+ string FLocal.Common.IOutputParams.preprocessBodyIntermediate(string bodyIntermediate) {
+ return bodyIntermediate;
+ }
+ }
+}
diff --git a/IISMainHandler/handlers/RootHandler.cs b/IISMainHandler/handlers/RootHandler.cs
index 8425ea9..c5b64f3 100644
--- a/IISMainHandler/handlers/RootHandler.cs
+++ b/IISMainHandler/handlers/RootHandler.cs
@@ -16,7 +16,14 @@ namespace FLocal.IISHandler.handlers {
}
override protected IEnumerable getSpecificData(WebContext context) {
- return new XElement[0];
+ Uri url = context.httprequest.Url;
+ return new XElement[] {
+ new XElement(
+ "url",
+ new XElement("host", url.Host),
+ new XElement("port", url.Port)
+ ),
+ };
}
}
diff --git a/templates/Full/Root.xslt b/templates/Full/Root.xslt
index 0fa4685..165bc5e 100644
--- a/templates/Full/Root.xslt
+++ b/templates/Full/Root.xslt
@@ -47,12 +47,46 @@
+
+ https://
+
+ :
+
+
+
+