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

fix(payloadCodec): replace the registered PayloadCodec if the type is same when using WithPayloadCodec for server-side #1362

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

YangruiEmma
Copy link
Member

@YangruiEmma YangruiEmma commented May 27, 2024

What type of PR is this?

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

fix: 使用 WithPayloadCodec 设置的 PayloadCodec 如果是预注册的,则替换预注册的PayloadCodec

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional): WithPayloadCodec 设置 PayloadCodec 后,会限定Server所有请求都用该 PayloadCodec,但如果设置的是预注册的PayloadCodec类型,是为了对预注册的PayloadCodec添加额外的配置,只需替换掉注册的 PayloadCodec。
如果不做此修改,在多 Service 场景,假如用户设置了 NewThriftCodecWithConfig 就会导致 Protobuf 的请求无法被解码。

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@YangruiEmma YangruiEmma requested review from a team as code owners May 27, 2024 15:02
@YangruiEmma YangruiEmma changed the title fix: replace the registered PayloadCodec if the type is same when using WithPayloadCodec for server-side fix(payloadCodec): replace the registered PayloadCodec if the type is same when using WithPayloadCodec for server-side May 27, 2024
@YangruiEmma YangruiEmma merged commit f348aa4 into develop Jun 2, 2024
36 checks passed
@YangruiEmma YangruiEmma deleted the fix/payload_codec branch June 2, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants