[PR #2982] [MERGED] server: clean up request handling, hold on to encoded request #3467

Closed
opened 2026-03-16 11:45:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2982
Author: @djc
Created: 5/9/2025
Status: Merged
Merged: 5/10/2025
Merged by: @djc

Base: mainHead: request-handling


📝 Commits (10+)

  • 2eeb8f6 server: extract closures
  • b94dda3 server: move Request creation up into handle_request()
  • 9bf95df server: take AccessControl by reference
  • d184fdf server: use Bytes for request bodies
  • 13ef4e7 server: store original request bytes in Request
  • 226918c server: avoid duplicate method definitions
  • 0c33348 server: take Request in Authority::update()
  • 851e58c server: rename and re-order arguments
  • fe7a279 server: take Request in SqliteAuthority::authorize()
  • 8657ec3 server: avoid re-encoding request message for signature verification

📊 Changes

22 files changed (+343 additions, -275 deletions)

View changed files

📝 Cargo.lock (+2 -0)
📝 bin/Cargo.toml (+1 -0)
📝 bin/tests/integration/authority_battery/basic.rs (+9 -1)
📝 bin/tests/integration/authority_battery/dynamic_update.rs (+10 -3)
📝 crates/server/src/authority/authority.rs (+3 -3)
📝 crates/server/src/authority/authority_object.rs (+4 -6)
📝 crates/server/src/server/h2_handler.rs (+9 -2)
📝 crates/server/src/server/h3_handler.rs (+1 -1)
📝 crates/server/src/server/mod.rs (+112 -104)
📝 crates/server/src/server/quic_handler.rs (+2 -2)
📝 crates/server/src/server/request_handler.rs (+11 -3)
📝 crates/server/src/store/blocklist.rs (+4 -4)
📝 crates/server/src/store/file.rs (+6 -6)
📝 crates/server/src/store/forwarder.rs (+4 -4)
📝 crates/server/src/store/in_memory/mod.rs (+3 -3)
📝 crates/server/src/store/recursor.rs (+4 -4)
📝 crates/server/src/store/sqlite/mod.rs (+36 -96)
📝 tests/integration-tests/Cargo.toml (+1 -0)
📝 tests/integration-tests/src/lib.rs (+5 -3)
📝 tests/integration-tests/tests/integration/catalog_tests.rs (+61 -10)

...and 2 more files

📄 Description

Attempt to follow up on https://github.com/hickory-dns/hickory-dns/pull/2977#discussion_r2078461204. Might be too simplistic?

r? @cpu


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2982 **Author:** [@djc](https://github.com/djc) **Created:** 5/9/2025 **Status:** ✅ Merged **Merged:** 5/10/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `request-handling` --- ### 📝 Commits (10+) - [`2eeb8f6`](https://github.com/hickory-dns/hickory-dns/commit/2eeb8f6e799b61ba302f75d660d1081097b0f902) server: extract closures - [`b94dda3`](https://github.com/hickory-dns/hickory-dns/commit/b94dda3522ad52bc7334aed783e6fa8d5be12faa) server: move Request creation up into handle_request() - [`9bf95df`](https://github.com/hickory-dns/hickory-dns/commit/9bf95dfc4190aadb2ffaa2b017c8ed9fc781f554) server: take AccessControl by reference - [`d184fdf`](https://github.com/hickory-dns/hickory-dns/commit/d184fdf619599e9985a8c549f0001c88e607cfc2) server: use Bytes for request bodies - [`13ef4e7`](https://github.com/hickory-dns/hickory-dns/commit/13ef4e7cea10c4c8093be3b3fb52723c96025dd1) server: store original request bytes in Request - [`226918c`](https://github.com/hickory-dns/hickory-dns/commit/226918cfdd2c7ecab75e5f61af5cb0b1ee64f9f2) server: avoid duplicate method definitions - [`0c33348`](https://github.com/hickory-dns/hickory-dns/commit/0c333485ceb0fda2846de08ad977131d4f7e2468) server: take Request in Authority::update() - [`851e58c`](https://github.com/hickory-dns/hickory-dns/commit/851e58c0d10754288a592c2c77b7032ff0fbf9e5) server: rename and re-order arguments - [`fe7a279`](https://github.com/hickory-dns/hickory-dns/commit/fe7a2799afef6d436e8c9734fda70fbf22fd5cfd) server: take Request in SqliteAuthority::authorize() - [`8657ec3`](https://github.com/hickory-dns/hickory-dns/commit/8657ec3beff15548bdef556c38f3fb9038558c1e) server: avoid re-encoding request message for signature verification ### 📊 Changes **22 files changed** (+343 additions, -275 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+2 -0) 📝 `bin/Cargo.toml` (+1 -0) 📝 `bin/tests/integration/authority_battery/basic.rs` (+9 -1) 📝 `bin/tests/integration/authority_battery/dynamic_update.rs` (+10 -3) 📝 `crates/server/src/authority/authority.rs` (+3 -3) 📝 `crates/server/src/authority/authority_object.rs` (+4 -6) 📝 `crates/server/src/server/h2_handler.rs` (+9 -2) 📝 `crates/server/src/server/h3_handler.rs` (+1 -1) 📝 `crates/server/src/server/mod.rs` (+112 -104) 📝 `crates/server/src/server/quic_handler.rs` (+2 -2) 📝 `crates/server/src/server/request_handler.rs` (+11 -3) 📝 `crates/server/src/store/blocklist.rs` (+4 -4) 📝 `crates/server/src/store/file.rs` (+6 -6) 📝 `crates/server/src/store/forwarder.rs` (+4 -4) 📝 `crates/server/src/store/in_memory/mod.rs` (+3 -3) 📝 `crates/server/src/store/recursor.rs` (+4 -4) 📝 `crates/server/src/store/sqlite/mod.rs` (+36 -96) 📝 `tests/integration-tests/Cargo.toml` (+1 -0) 📝 `tests/integration-tests/src/lib.rs` (+5 -3) 📝 `tests/integration-tests/tests/integration/catalog_tests.rs` (+61 -10) _...and 2 more files_ </details> ### 📄 Description Attempt to follow up on https://github.com/hickory-dns/hickory-dns/pull/2977#discussion_r2078461204. Might be too simplistic? r? @cpu --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:45:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3467
No description provided.