Don't 404 when any of the hashes has a / in it
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 16 Oct 2011 04:12:46 +0000 (00:12 -0400)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 16 Oct 2011 04:12:46 +0000 (00:12 -0400)
This fixes "random" problems getting resources served by
WebResource.axd.

mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs

index 6b644c1a3b44d9144aba2b502789cbe02664465f..f8264dffff2783b1fa7494249b3727fc1ecc9fd9 100644 (file)
@@ -324,7 +324,7 @@ namespace System.Web.Handlers
                                        atime = QueryParamSeparator + "t=" + DateTime.UtcNow.Ticks;
                        }
 #endif
-                       string d = assemblyNameHash + "_" + resourceNameHash +  (debug ? "_t" : "_f");
+                       string d = HttpUtility.UrlEncode (assemblyNameHash + "_" + resourceNameHash +  (debug ? "_t" : "_f"));
                        string href = HandlerFileName + "?d=" + d + atime + extra;
                        HttpContext ctx = HttpContext.Current;
                        HttpRequest req = ctx != null ? ctx.Request : null;