@@ -10,7 +10,7 @@ namespace Microsoft.SourceBrowser.SourceIndexServer
10
10
{
11
11
public static class Helpers
12
12
{
13
- public static async Task ProxyRequestAsync ( this HttpContext context , string targetPath , Action < HttpRequestMessage > configureRequest = null )
13
+ private static async Task ProxyRequestAsync ( this HttpContext context , string targetPath , Action < HttpRequestMessage > configureRequest = null )
14
14
{
15
15
var fs = new AzureBlobFileSystem ( IndexProxyUrl ) ;
16
16
var props = fs . FileProperties ( targetPath ) ;
@@ -24,15 +24,15 @@ public static async Task ProxyRequestAsync(this HttpContext context, string targ
24
24
}
25
25
}
26
26
27
- private static bool UrlExists ( string proxyRequestPath )
27
+ private static bool FileExists ( string proxyRequestPath )
28
28
{
29
29
var fs = new AzureBlobFileSystem ( IndexProxyUrl ) ;
30
30
return fs . FileExists ( proxyRequestPath ) ;
31
31
}
32
32
33
33
public static async Task ServeProxiedIndex ( HttpContext context , Func < Task > next )
34
34
{
35
- var path = context . Request . Path . ToUriComponent ( ) ;
35
+ var path = context . Request . Path . Value ;
36
36
37
37
if ( ! path . EndsWith ( ".html" , StringComparison . Ordinal ) && ! path . EndsWith ( ".txt" , StringComparison . Ordinal ) )
38
38
{
@@ -49,7 +49,7 @@ public static async Task ServeProxiedIndex(HttpContext context, Func<Task> next)
49
49
50
50
var proxyRequestPathSuffix = ( path . StartsWith ( "/" , StringComparison . Ordinal ) ? path : "/" + path ) . ToLowerInvariant ( ) ;
51
51
52
- if ( ! UrlExists ( proxyRequestPathSuffix ) )
52
+ if ( ! FileExists ( proxyRequestPathSuffix ) )
53
53
{
54
54
await next ( ) . ConfigureAwait ( false ) ;
55
55
return ;
0 commit comments