Permalink
Browse files

Backport of r120349.

svn path=/branches/mono-2-2/xsp/; revision=120350
  • Loading branch information...
1 parent b6ddffd commit 911747416712043b067a9e407c6335ba3525d2cb @grendello grendello committed Dec 1, 2008
Showing with 10 additions and 1 deletion.
  1. +6 −0 ChangeLog
  2. +4 −1 src/Mono.WebServer/BaseApplicationHost.cs
View
@@ -1,3 +1,9 @@
+2008-12-01 Marek Habersack <mhabersack@novell.com>
+
+ * src/Mono.WebServer/BaseApplicationHost.cs: check if the key
+ exists in the handlers cache after acquiring the lock and update
+ it instead of adding.
+
2008-11-28 Marek Habersack <mhabersack@novell.com>
* src/Mono.WebServer/BaseApplicationHost.cs: add locking to avoid
@@ -218,7 +218,10 @@ public virtual bool IsHttpHandler (string verb, string uri)
bool handlerFound = LocateHandler (verb, uri);
lock (handlersCacheLock) {
- handlersCache.Add (cacheKey, handlerFound);
+ if (handlersCache.ContainsKey (cacheKey))
+ handlersCache [cacheKey] = handlerFound;
+ else
+ handlersCache.Add (cacheKey, handlerFound);
}
return handlerFound;

0 comments on commit 9117474

Please sign in to comment.