Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@balboah
Copy link
Contributor

@balboah balboah commented Jun 27, 2024

What

When CoreDNS is used as a dns-over-https server, it sets cache control headers.
However, the max-age is set as a float, instead of an integer as specified in RFC 2616.

How

This PR truncates the float into an integer, using uint32 which is also what the dnsutil is using.

Why

Setting the max-age as a float can make the value get ignored in some cases, such as when fronted by a caching CDN.

@chrisohaver
Copy link
Member

LGTM thanks! Can you sign the commit to the DCO check passes? Thanks!

As specified in rfc2616, the max-age is an integer.
Setting a float might make the header get ignored in some cases.
@balboah balboah force-pushed the fix/cache-control branch from ba59fa5 to b5cb5a7 Compare July 1, 2024 14:59
@balboah
Copy link
Contributor Author

balboah commented Jul 1, 2024

replaced with signed commit, hope everything checks out!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants