Skip to content

Conversation

@omoerbeek
Copy link
Member

This allows OpenBSD ntpd time constraint retrieval to work properly with nghttp2 incoming DoH.

Note that requests having no alpn data do not appear in any stats. Should that be changed?

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

struct tm tmval{};
time_t timestamp = time(nullptr);
size_t len = strftime(data1.data(), data1.size(), dateformat.data(), gmtime_r(&timestamp, &tmval));
assert(len != 0);
Copy link
Contributor

@miodvallat miodvallat Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to keep that assert? Maybe simply skip the d_out.insert(..., data1)) in this case.

Copy link
Member Author

@omoerbeek omoerbeek Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I want to keep the assert, it means the buffer was too small. Getting a very clear message is better than having to debug why the Date header is missing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good until the year 1000000

@coveralls
Copy link

coveralls commented Oct 27, 2025

Pull Request Test Coverage Report for Build 18837422702

Details

  • 0 of 11 (0.0%) changed or added relevant lines in 1 file are covered.
  • 10680 unchanged lines in 98 files lost coverage.
  • Overall coverage increased (+0.02%) to 73.025%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pdns/dnsdistdist/dnsdist-nghttp2-in.cc 0 11 0.0%
Files with Coverage Reduction New Missed Lines %
pdns/burtle.hh 2 98.19%
pdns/channel.hh 2 57.79%
pdns/dns.cc 2 88.29%
pdns/dnsdistdist/dnsdist-dnsquestion.cc 2 70.59%
pdns/dnsdistdist/dnsdist-idstate.cc 2 76.32%
pdns/dnsdistdist/dnsdist-lua-bindings-kvs.cc 2 48.0%
pdns/dnsdistdist/dnsdist-lua.hh 2 47.89%
pdns/epollmplexer.cc 2 85.71%
pdns/libssl.hh 2 0.0%
pdns/pollmplexer.cc 2 84.97%
Totals Coverage Status
Change from base Build 18832893357: 0.02%
Covered Lines: 127481
Relevant Lines: 163870

💛 - Coveralls

This allows OpenBSD ntpd time constraint retrieval to work properly
with nghttp2 incoming DoH.

Note that requests having no alpn data do not appear in any stats.
Should that be changed?

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek omoerbeek force-pushed the dnsdist-http1-date-header branch from 6a49658 to 2f23fc9 Compare October 27, 2025 10:15
@omoerbeek omoerbeek requested a review from rgacogne October 27, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants