1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-23 22:24:54 +02:00

Remove default charset from 'application/json' Content-Type header (#2568)

Fixes #2567
This commit is contained in:
Suwon Chae
2024-02-06 14:41:33 +09:00
committed by GitHub
parent f12fdb09cd
commit 76994d17d5
4 changed files with 15 additions and 10 deletions

View File

@@ -131,7 +131,7 @@ func TestDecompressSkipper(t *testing.T) {
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)
e.ServeHTTP(rec, req)
assert.Equal(t, rec.Header().Get(echo.HeaderContentType), echo.MIMEApplicationJSONCharsetUTF8)
assert.Equal(t, rec.Header().Get(echo.HeaderContentType), echo.MIMEApplicationJSON)
reqBody, err := io.ReadAll(c.Request().Body)
assert.NoError(t, err)
assert.Equal(t, body, string(reqBody))