Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Ensure prefix is not a global replacement #211
Browse files Browse the repository at this point in the history
Former-commit-id: cb49b14
Former-commit-id: b5039b4070e86d917f27046ddfbd342fbc90d4f5
  • Loading branch information
JimBobSquarePants committed Sep 9, 2015
1 parent acb231f commit c81072f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
Expand Up @@ -467,13 +467,13 @@ private async Task ProcessImageAsync(HttpContext context)
{
string[] paths = url.Split('?');
requestPath = protocol
+ request.Path.Replace(currentService.Prefix, string.Empty).TrimStart('/')
+ request.Path.TrimStart('/').Remove(0, currentService.Prefix.Length).TrimStart('/')
+ "?" + paths[1];
queryString = paths[2];
}
else
{
requestPath = protocol + request.Path.Replace(currentService.Prefix, string.Empty).TrimStart('/');
requestPath = protocol + request.Path.TrimStart('/').Remove(0, currentService.Prefix.Length).TrimStart('/');
queryString = request.QueryString.ToString();
}
}
Expand Down

0 comments on commit c81072f

Please sign in to comment.