Skip to content

Commit

Permalink
Persist url path and query params in /me/m/ redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Jul 27, 2013
1 parent 8e48fae commit c28d748
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion r2/r2/controllers/reddit_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ def set_multireddit():
if c.user_is_loggedin:
# redirect /user/foo/m/... to /me/m/... for user foo.
if username == c.user.name.lower():
abort(302, location="/me/m/%s" % multipath)
# trim off multi id
url_parts = request.path_qs.split("/")[5:]
url_parts.insert(0, "/me/m/%s" % multipath)
abort(302, location="/".join(url_parts))

multi_id = "/user/%s/m/%s" % (username, multipath)

Expand Down

0 comments on commit c28d748

Please sign in to comment.