larksuite / larksuite/oapi-sdk-java

Url验证的response里面content-type错误

Open
#139 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
310
Forks
115
PR merge metrics
No merged PRs in 30d

Description

发现一个小小的问题,url验证的逻辑返回的response header里面content-type是错误的:(key value都是”content-type")
image
影响:body内容正常,我们api网关层解析这个header时报错

CardActionHandler :: handle代码

eventResp.setContentType(Constants.CONTENT_TYPE);
// 应该是:
eventResp.setContentType(Constants.JSON_CONTENT_TYPE);

参考其他处地方调用:
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate CardActionHandler.handle and inspect how the response content type is assigned. Compare Constants.CONTENT_TYPE with Constants.JSON_CONTENT_TYPE and verify that URL validation responses expose the JSON content type so the API gateway can parse the header without error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.