Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 5936:ed5c19fca083 | 5937:5d0873a4de4a |
|---|---|
| 1262 otk.commit() | 1262 otk.commit() |
| 1263 | 1263 |
| 1264 if reject: | 1264 if reject: |
| 1265 # User exceeded limits: find out how long to wait | 1265 # User exceeded limits: find out how long to wait |
| 1266 status=gcra.status(rlkey, limit) | 1266 status=gcra.status(rlkey, limit) |
| 1267 raise Reject(_("Logins occurring too fast. Please wait: %d seconds.")%status['Retry-After']) | 1267 raise Reject(_("Logins occurring too fast. Please wait: %s seconds.")%status['Retry-After']) |
| 1268 | 1268 |
| 1269 self.verifyLogin(self.client.user, password) | 1269 self.verifyLogin(self.client.user, password) |
| 1270 except exceptions.LoginError as err: | 1270 except exceptions.LoginError as err: |
| 1271 self.client.make_user_anonymous() | 1271 self.client.make_user_anonymous() |
| 1272 for arg in err.args: | 1272 for arg in err.args: |
