From 4eb3336f7b58bb255c7167b46fee5f8a900d5d44 Mon Sep 17 00:00:00 2001 From: Ricky Ramirez Date: Thu, 11 Jul 2013 18:38:05 -0700 Subject: [PATCH] reddit_base: Make appengine regex deal with custom User-Agents. Previously, the AppEngine UA was forced. Now it is only force appended. https://developers.google.com/appengine/docs/python/urlfetch/?hl=en --- r2/r2/controllers/reddit_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/controllers/reddit_base.py b/r2/r2/controllers/reddit_base.py index 8220ff480..248b7dc45 100644 --- a/r2/r2/controllers/reddit_base.py +++ b/r2/r2/controllers/reddit_base.py @@ -542,7 +542,7 @@ def ratelimit_agents(): return # parse out the appid for appengine apps - appengine_match = appengine_re.match(user_agent) + appengine_match = appengine_re.search(user_agent) if appengine_match: appid = appengine_match.group(1) ratelimit_agent(appid)