Skip to main content

parse_retry_after

Function parse_retry_after 

Source
fn parse_retry_after(headers: &HeaderMap) -> Option<u64>
Expand description

Parse an upstream Retry-After into delta-seconds. Accepts delta-seconds or an HTTP-date.

A date already in the past means “retry now” and is floored to the minimum rather than discarded. Anything unparseable yields None, leaving the caller to its own default.