Skip to content

Commit

Permalink
updated last match result bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandycohen committed Dec 19, 2014
1 parent 49e0284 commit b31a407
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Hi.UrlRewrite/Processing/Results/ProcessRequestResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ public class ProcessRequestResult
public ProcessRequestResult(Uri originalUri, RuleResult finalRuleResult, bool matchedAtLeastOneRule, List<RuleResult> processedResults)
{
OriginalUri = originalUri;
RewrittenUri = finalRuleResult.RewrittenUri;
MatchedAtLeastOneRule = matchedAtLeastOneRule;
ProcessedResults = processedResults;
FinalAction = finalRuleResult.ResultAction;

if (finalRuleResult != null)
{
RewrittenUri = finalRuleResult.RewrittenUri;
FinalAction = finalRuleResult.ResultAction;
}
}

public Uri OriginalUri { get; set; }
Expand Down
5 changes: 0 additions & 5 deletions Hi.UrlRewrite/Processing/UrlRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ public ProcessRequestResult ProcessRequestUrl(Uri requestUri, List<InboundRule>

var lastMatchedRuleResult = processedResults.FirstOrDefault(r => r.RuleMatched);

if (lastMatchedRuleResult == null)
{
return null;
}

var finalResult = new ProcessRequestResult(originalUri, lastMatchedRuleResult, matchedAtLeastOneRule, processedResults);

return finalResult;
Expand Down

0 comments on commit b31a407

Please sign in to comment.