apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: `content-type` request header has been rewritten

Open baicaiclouds opened this issue 11 months ago • 2 comments

Current Behavior

When customizing the API plugin with Java, the Content type response header is rewritten, and the proxy response header is application/JSON. The value of the context type returned through the custom plugin becomes text/plain; Charset=utf-8, how to solve this problem?

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

1、Customize Java plugins 2、run 3、watch response image Uploading image.png…

Environment

  • APISIX version 3.1.0

baicaiclouds avatar Mar 25 '24 02:03 baicaiclouds

Need more info on apisix configs, upstream and route. And if any global rules(if present).

SilentEntity avatar Mar 25 '24 06:03 SilentEntity

I agree with @SilentEntity, it's very likely that something is wrong in your code. You may want to give a try with a bare minimum java plugin and see if the error exists there.

Also, one of your screenshots didn't get uploaded correctly. image

shreemaan-abhishek avatar Mar 30 '24 06:03 shreemaan-abhishek

Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jun 08 '24 10:06 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Jun 11 '24 10:06 github-actions[bot]