This project is read-only.
4
Vote

Alias fails if not all lowercase letters

description

If the alias name contains uppercase letters or a dash or underscore (all valid characters in a URL) the original image is returned instead of the cropped image.

comments

Jskovgaard wrote Oct 18, 2013 at 9:13 PM

I'm seeing this as well using 1.0.9

MvdDonk wrote Jan 13, 2014 at 7:49 AM

The bug is caused by using RewritePath instead of the newer TransferRequest.
In the file Eksponent.CropUp\Plugins\CleanUrls.cs the rewrite is being handled:
ctx.RewritePath(BackingDialect.GetUrl(imagePath, imageArgs) + 
    (!string.IsNullOrEmpty(queryString) ? "&" + queryString : null));
If you change the code to use TransferRequest and make sure you don't UrlEncode the url it seems to be working again. I've changed the code to:
var rewritenUrl = BackingDialect.GetUrl(imagePath, imageArgs) + 
    (!string.IsNullOrEmpty(queryString) ? "&" + queryString : null);

ctx.Server.TransferRequest(ctx.Server.UrlDecode(rewritenUrl));