aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Enabled rule attribute never used #139

Closed BrennanConroy closed 8 years ago

BrennanConroy commented 8 years ago

https://github.com/aspnet/BasicMiddleware/blob/dev/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs#L58

@mikaelm12 @muratg @jkotalik

jkotalik commented 8 years ago

That issues doesn't fix the enable rule never being used. It should be added here: https://github.com/aspnet/BasicMiddleware/blob/dev/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteRuleBuilder.cs#L31 as a check to see if we should be creating the rule in the first place.

mikaelm12 commented 8 years ago

The enabled flag on the builder is actually being used here to determine if each rule should be added https://github.com/aspnet/BasicMiddleware/blob/d57149f9c04ff410f9a146ed686f15693e962137/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs#L51-L54