Closed BrennanConroy closed 8 years ago
We should add a couple test cases for the use cases.
So the BackReference isn't set here because a string compare is being used here in stead of a regex match. We can either do a regex match here or we have to change the BackReference to be something other than a GroupCollection
Thoughts @Tratcher @natemcmaster @BrennanConroy?
Fix the GroupCollection
!
Seriously. I couldn't use an dict/list because it would add an extra O(n) operation to transfer it. IMO group collection should have an interface similar to a list, but unfortunately there isn't.
@muratg The 1.1.0 fix for this is to just do a regex match instead of a string compare and set the back reference with the GroupCollection
from the regex match. The 1.2.0 solution for fixing the TrackAllCaptures
will need to use it
The back reference will just be the pattern https://github.com/aspnet/BasicMiddleware/blob/dev/src/Microsoft.AspNetCore.Rewrite/Internal/UrlMatches/ExactMatch.cs#L21