using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Text.RegularExpressions; using System.IO; using FLocal.Core; namespace FLocal.IISHandler.handlers { class StaticHandler : ISpecificHandler { private string[] requestParts; public StaticHandler(string[] requestParts) { this.requestParts = requestParts; } public void Handle(WebContext context) { if(this.requestParts.Length < 2) { throw new HttpException(403, "listing not allowed"); } Regex checker = new Regex("^[a-z][0-9a-z\\-_]*(\\.[a-zA-Z]+)?$", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline); string path = ""; for(int i=1; i