Re: working around status code 429

Timothe Litt via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On 01-Feb-24 05:39, Daniel Stenberg via curl-users wrote:
> On Thu, 1 Feb 2024, Dirk Hünniger via curl-users wrote:
>
>> you are right. Its retrying after one second, and not doing the 
>> exponential fallback it usually does. Thats why it concluded after a 
>> few minutes. Thanks for the explanation that curl is following the 
>> servers proposal to try again after one second. Everything is 
>> explained this way. If you want, you can add a command line option to 
>> override the servers proposal. For me it is not needed because, I do 
>> the retrying in an external loop around the call to curl now.
>
> I'm thinking it could perhaps be argued that curl should treat the 
> Retry-After time as a *minimum* time, so that if it already has backed 
> off a bit by itself, it would still use that longer time...
>
>
Yes.  That's what RFC9110 says it should do.  If the user agent has 
reason (or instructions) to wait longer, Retry-After should not 
supersede them.


        10.2.3.<https://www.rfc-editor.org/rfc/rfc9110#section-10.2.3>Retry-After
        <https://www.rfc-editor.org/rfc/rfc9110#name-retry-after>

Servers send the "Retry-After" header field to indicate how long the 
user agent ought to wait before making a follow-up request. When sent 
with a503 (Service Unavailable) 
<https://www.rfc-editor.org/rfc/rfc9110#status.503>response, Retry-After 
indicates how long the service is expected to be unavailable to the 
client. When sent with any3xx (Redirection) 
<https://www.rfc-editor.org/rfc/rfc9110#status.3xx>response, 
*Retry-After indicates the _minimum _time that the user agent is asked 
to wai*t before issuing the redirected request.

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
OpenPGP_signature.asc (application/pgp-signature, 495 B)
-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEE0UvvF0GpbrNhifE5DTaRiR4XoSQFAmW7dzQFAwAAAAAACgkQDTaRiR4XoSSB
dgf9HRGdB9SKkE69rrxhe9ptsKK7R5PfgQYgIGqUuaGO8bVlCWXGclLVtnPXhsebFAYHwhWdBoeI
dq3dhltvT6Z341lveymW9l3wbdm5TwuhMnapbEOjWN0uwbt2GUT5YU8WcCXMJZ3kSRRyHJib/hAE
pTrxKVJM79e11/cHnN5ppoi8gB9OQbqOxP0dwa2JEhBM5RuFaedHFmb2lphcy4DtOBTKRQ+xUKO0
k447UMfBI+Kg81/wLZyUz4FPwCbkeDci08E5Mn+1nzGzC4gyUnqSbHUquSE60kxsaVAaBVGabS9b
QvAds4Joq3TkNVcFWxUkJjzbJWkg2nyZBD9rz4norA==
=+E/t
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.