Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure a minimum retry interval of 5 seconds in fetching central configuration #690

Open
6 tasks
estolfo opened this issue Sep 23, 2022 · 2 comments
Open
6 tasks

Comments

@beniwohli
Copy link
Contributor

A question that came up while implementing this. The spec says

If the Cache-Control header is zero (or less than zero)

However, the relevant RFC says that max-age is of type delta-seconds:

The delta-seconds rule specifies a non-negative integer, representing time in seconds.

So, negative values aren't allowed. Is the intention of the spec to behave reasonably in the face of misbehaving servers/proxies, or could we simplify this a bit?

FWIW, the Python agent behaves as spec'd by accident, as the regex fails to parse negative values and falls back to the default interval of 300s.

@felixbarny
Copy link
Member

Is the intention of the spec to behave reasonably in the face of misbehaving servers/proxies, or could we simplify this a bit?

As guarding against negative values doesn't seem to increase the complexity, it seems like a good idea to do that.

FWIW, the Python agent behaves as spec'd by accident, as the regex fails to parse negative values and falls back to the default interval of 300s.

This sounds like a valid way to handle it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants