Fix Retry-After header check (#1522)

This failed to be triggered because the response has all its headers as lower case
This commit is contained in:
Sylvain Joubert 2021-01-29 21:51:26 +01:00 committed by GitHub
parent 5e2e84cdbc
commit 8684be0970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ bool GetResponseHeaderBasedDelay(RawResponse const& response, Delay& retryAfter)
return true;
}
if ((header = responseHeaders.find("Retry-After")) != responseHeadersEnd)
if ((header = responseHeaders.find("retry-after")) != responseHeadersEnd)
{
// This header is in seconds.
retryAfter = std::chrono::seconds(std::stoi(header->second));