Draft: uscan: handle HTTP response 429 (too many requests)

Hello,

while checking the status of some Debian packages, I noticed that for some of them, the tracker doesn't have the correct info about latest versions. For example, nco shows:

uscan

Github is sending response code 429, which uscan apparently doesn't handle.

This change fixes that by adding a response_redirect handler to the downloader. When the remote server sends 429, it waits a bit and then retries the same request according to description at mozilla.org.

I've tested it by running hundreds of concurrent uscan processes against github, it returned this error code, and after uscan waited a few minutes, it proceeded with eventual success.

If there is demand, this could be made configurable so you could either wait or return an error, which would eventually be handled later.

Edited by Yadd

Merge request reports

Loading