Correcting the response status range in WsgiLimiterProxy

The response status should lie between 200 and 300 but the operator
used makes the condition true when response status is <= 200.
This patch corrects the same.

Change-Id: I7368eb7674642032b1313afe900b5f36f8ab0dea
Closes-Bug: #1823750
This commit is contained in:
whoami-rajat 2019-07-04 15:14:29 +05:30 committed by Rajat Dhasmana
parent ab6fbbec80
commit d72f738c01
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ class WsgiLimiterProxy(object):
resp = conn.getresponse()
if http_client.OK >= resp.status < http_client.MULTIPLE_CHOICES:
if (resp.status >= 200) and (resp.status < 300):
return None, None
return resp.getheader("X-Wait-Seconds"), resp.read() or None