Skip to content

KTOR-7961 Add TDM-Reservation and TDM-Policy header constants#5597

Merged
bjhham merged 1 commit into
ktorio:mainfrom
fru1tworld:fix/7961-tdm-headers
May 13, 2026
Merged

KTOR-7961 Add TDM-Reservation and TDM-Policy header constants#5597
bjhham merged 1 commit into
ktorio:mainfrom
fru1tworld:fix/7961-tdm-headers

Conversation

@fru1tworld
Copy link
Copy Markdown
Contributor

Subsystem
ktor-http

Motivation
KTOR-7961 Add known TDM headers to the HttpHeaders object

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 23bc6aa1-4474-4123-aa64-2392a252bf99

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed7bf0 and c3eaa97.

📒 Files selected for processing (3)
  • ktor-http/api/ktor-http.api
  • ktor-http/api/ktor-http.klib.api
  • ktor-http/common/src/io/ktor/http/HttpHeaders.kt

📝 Walkthrough

Walkthrough

This PR adds two new standard HTTP header constants to the Ktor HTTP library: TDMPolicy and TDMReservation, which map to the header names "TDM-Policy" and "TDM-Reservation". The constants are defined in the main source file and properly exposed in both Java and Kotlin multiplatform library API declarations.

Changes

TDM Header Constants

Layer / File(s) Summary
Source Constants
ktor-http/common/src/io/ktor/http/HttpHeaders.kt
HttpHeaders gains TDMReservation and TDMPolicy const val declarations with their string values and W3C reference.
API Declarations
ktor-http/api/ktor-http.api, ktor-http/api/ktor-http.klib.api
Java static field and Kotlin multiplatform library signatures are added to reflect the new public constants.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • ktorio/ktor#5237: Broader refactor that converts and expands HTTP header constants in the same HttpHeaders class.

Suggested reviewers

  • bjhham
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes the Subsystem and Motivation sections as required by the template but omits the Solution section which explains the implementation approach. Add a Solution section describing how the header constants were implemented (e.g., added as const val String properties to HttpHeaders).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding TDM-Reservation and TDM-Policy header constants to the HttpHeaders class.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bjhham bjhham enabled auto-merge (rebase) May 13, 2026 06:15
@bjhham bjhham merged commit 734ce92 into ktorio:main May 13, 2026
16 of 19 checks passed
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