apache / apache/apisix-java-plugin-runner

bug: POST request with body contain chinese characters exist encoding problem

Open
#154 6 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Java
Stars
152
Forks
102
PR merge metrics
No merged PRs in 30d

Description

### Issue description

### Environment

apisix-java-plugin-runner version:0.2.0
apsix version:2.13.1

### Minimal test code / Steps to reproduce the issue

1. Test post request contain chinese characters in OKHttp:
`{"source":"高德地图","content":"https://surl.amap.com/1PoSAsa1l4Ud","deviceId":"123456"}`
2. inner OKHttp,body will be translated to utf-8 format bytes:
`Charset charset = Util.UTF_8;
byte[] bytes = content.getBytes(charset);
`
4. Custom filter in apisix-java-plugin-runner, get request body:
`{"source":"高德地图","content":"https://surl.amap.com/1PoSAsa1l4Ud","deviceId":"123456"}`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.