reddit_base: Also grab dev AppEngine UAs.

"dev~" is sent when the AppEngine SDK is run on a local machine for
development purposes.
This commit is contained in:
Ricky Ramirez
2013-07-12 14:45:54 -07:00
parent 4eb3336f7b
commit 3bfe0a2513

View File

@@ -534,7 +534,7 @@ def ratelimit_agent(agent):
request.environ['retry_after'] = SLICE_SIZE - remainder
abort(429)
appengine_re = re.compile(r'AppEngine-Google; \(\+http://code.google.com/appengine; appid: s~([a-z0-9-]{6,30})\)\Z')
appengine_re = re.compile(r'AppEngine-Google; \(\+http://code.google.com/appengine; appid: (?:dev|s)~([a-z0-9-]{6,30})\)\Z')
def ratelimit_agents():
user_agent = request.user_agent