Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 5937:5d0873a4de4a
fix rate limit headers - were ints/floats need to be strings
Running under gunicorn rest requests were crashing. Not all of the
values for the rate limit headers were strings. Some were
numbers. This caused the header generation for wsgi to fail. Now the
values are all strings.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 20 Oct 2019 20:56:56 -0400 |
| parents | 883c9e90b403 |
| children | fe334430ca07 |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Sat Oct 19 20:19:43 2019 -0400 +++ b/roundup/cgi/actions.py Sun Oct 20 20:56:56 2019 -0400 @@ -1264,7 +1264,7 @@ if reject: # User exceeded limits: find out how long to wait status=gcra.status(rlkey, limit) - raise Reject(_("Logins occurring too fast. Please wait: %d seconds.")%status['Retry-After']) + raise Reject(_("Logins occurring too fast. Please wait: %s seconds.")%status['Retry-After']) self.verifyLogin(self.client.user, password) except exceptions.LoginError as err:
