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

Reapply "Renamed tchannel caller-procedure header (#2246)" #2277

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

=======
## [Unreleased]
- No changes yet.
### Changed
- tchannel: Renamed caller-procedure header from `$rpc$-caller-procedure` to `rpc-caller-procedure`.

## [1.73.0] - 2024-05-31
- Upgraded go version to 1.21, set toolchain version.
Expand Down
8 changes: 7 additions & 1 deletion transport/tchannel/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import (
)

const (
/** Response headers **/

// ErrorCodeHeaderKey is the response header key for the error code.
ErrorCodeHeaderKey = "$rpc$-error-code"
// ErrorNameHeaderKey is the response header key for the error name.
Expand All @@ -48,8 +50,11 @@ const (
ApplicationErrorDetailsHeaderKey = "$rpc$-application-error-details"
// ApplicationErrorCodeHeaderKey is the response header key for the application error code.
ApplicationErrorCodeHeaderKey = "$rpc$-application-error-code"

/** Request headers **/

// CallerProcedureHeader is the header key for the procedure of the caller making the request.
CallerProcedureHeader = "$rpc$-caller-procedure"
CallerProcedureHeader = "rpc-caller-procedure"
)

var _reservedHeaderKeys = map[string]struct{}{
Expand All @@ -60,6 +65,7 @@ var _reservedHeaderKeys = map[string]struct{}{
ApplicationErrorNameHeaderKey: {},
ApplicationErrorDetailsHeaderKey: {},
ApplicationErrorCodeHeaderKey: {},
CallerProcedureHeader: {},
}

func isReservedHeaderKey(key string) bool {
Expand Down