[FFmpeg-devel] [PATCH v2 4/9] avformat/http: Add support for Retry-After header
Derek Buitenhuis
derek.buitenhuis at gmail.com
Wed Apr 24 22:40:18 EEST 2024
On 4/24/2024 12:06 PM, Martin Storsjö wrote:
> Is this feature standardized in a RFC, or is it some other spec somewhere?
> I think it would be nice with a link to a spec in the commit message here.
It is in the RFC for 429 I noted in the commit I added that: RFC6585. It is also
probably in the 503 and 301 RFCs.
See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
I will add those.
>> + if (s->respect_retry_after && s->retry_after > 0) {
>> + reconnect_delay = s->retry_after;
>
> It'd be nice with a comment to clarify the units of both values here,
> which apparently both happen to be integer seconds?
Yes, seconds.
I have added:
/* Both the Retry-After header and the option are in seconds. */
>> + } else if (!av_strcasecmp(tag, "Retry-After")) {
>> + s->retry_after = strtoul(p, NULL, 10);
>
> Can you add a comment here, to clarify what unit the value is expressed
> in?
Added:
/* Specifies how long to wait before retrying in second. */
- Derek
More information about the ffmpeg-devel
mailing list