From b76fc00c5bb9ead77280d0c6064a897931235e41 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Mon, 28 Jun 2010 18:53:26 +0000 Subject: [PATCH] Fix for filenames with underline in StaticFileHandler --- Builder/IISMainHandler/build.txt | 2 +- Builder/IISUploadHandler/build.txt | 2 +- IISMainHandler/handlers/StaticHandler.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 8d4011a..511fa83 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -412 \ No newline at end of file +414 \ No newline at end of file diff --git a/Builder/IISUploadHandler/build.txt b/Builder/IISUploadHandler/build.txt index 70e1a64..bc768da 100644 --- a/Builder/IISUploadHandler/build.txt +++ b/Builder/IISUploadHandler/build.txt @@ -1 +1 @@ -144 \ No newline at end of file +146 \ No newline at end of file diff --git a/IISMainHandler/handlers/StaticHandler.cs b/IISMainHandler/handlers/StaticHandler.cs index 0668e8c..7feea22 100644 --- a/IISMainHandler/handlers/StaticHandler.cs +++ b/IISMainHandler/handlers/StaticHandler.cs @@ -21,7 +21,7 @@ namespace FLocal.IISHandler.handlers { 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); + 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