From 51e7c0abbc179c0a716255ceee8fd8b322e252df Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Wed, 5 Jun 2013 13:04:56 -0700 Subject: [PATCH] Handle multi paths from route URLs case insensitively. This fixes multi lookups for users with capital letters in their name. --- r2/r2/controllers/reddit_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r2/r2/controllers/reddit_base.py b/r2/r2/controllers/reddit_base.py index fd9e2afc4..3e8d7a171 100644 --- a/r2/r2/controllers/reddit_base.py +++ b/r2/r2/controllers/reddit_base.py @@ -391,8 +391,8 @@ def set_subreddit(): routes_dict = request.environ["pylons.routes_dict"] if "multipath" in routes_dict and "username" in routes_dict: try: - path = '/user/%s/m/%s' % (routes_dict["username"], - routes_dict["multipath"]) + path = '/user/%s/m/%s' % (routes_dict["username"].lower(), + routes_dict["multipath"].lower()) c.site = LabeledMulti._byID(path) except tdb_cassandra.NotFound: abort(404)