In that case, be sure to add a unit test that they are treated the same with and without the trailing slash

-Samuel E. Giddins

On Nov 25, 2013, at 3:44 PM, Blake Watters <notifications@github.com> wrote:

In Code/RKPathTemplate.m:

> +    RKPathTemplateRegexPatternStringMatchingPathTemplate = [self generateRegexPatternString];
> +}
> +
> +- (NSCharacterSet *)nonParameterCharacterSet
> +{
> +    NSMutableCharacterSet *parameterCharacterSet = [NSMutableCharacterSet alphanumericCharacterSet];
> +    [parameterCharacterSet addCharactersInString:@"._{}"];
> +    NSCharacterSet *nonParameterCharacterSet = [parameterCharacterSet invertedSet];
> +    return nonParameterCharacterSet;
> +}
> +
> +- (BOOL)matchesPath:(NSString *)path variables:(NSDictionary **)variables
> +{
> +    NSString *cleanedPath = nil;
> +    // Remove Query Param
> +    if ([path rangeOfString:@"?"].location != NSNotFound) {
I think we probably normalize by removing any trailing slash. That way when you explode it by path separator you don't wind up with an empty component

—
Reply to this email directly or view it on GitHub.