diff --git a/src/i18n/Concrete/EarlyUrlLocalizer.cs b/src/i18n/Concrete/EarlyUrlLocalizer.cs index 6b95b99..f76b5ee 100644 --- a/src/i18n/Concrete/EarlyUrlLocalizer.cs +++ b/src/i18n/Concrete/EarlyUrlLocalizer.cs @@ -189,7 +189,13 @@ protected static void RedirectWithLanguage( context.Response.Status = "302 Moved Temporarily"; } context.Response.RedirectLocation = urlNew; - context.Response.End(); + + // End the request early: no further processing along the pipeline. + // NB: we did originally use context.Response.End(); here but that causes an + // unnecessary exception to be thrown (https://support.microsoft.com/en-us/kb/312629) (#195) + // NB: the line AFTER this line will execute, so best to return immediately here + // and from caller etc.. + context.ApplicationInstance.CompleteRequest(); } ///