Skip to content

Commit

Permalink
Reapply "Renamed tchannel caller-procedure header (#2246)"
Browse files Browse the repository at this point in the history
This reverts commit 25b1d7e.
  • Loading branch information
biosvs committed May 29, 2024
1 parent 0b3b4d6 commit 451a301
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 451a301

Please sign in to comment.