lodestar icon indicating copy to clipboard operation
lodestar copied to clipboard

Keymanager 204 (no content) responses return empty json body

Open nflaig opened this issue 2 years ago • 1 comments

Describe the bug

Some keymanager APIs are not spec compliant due to the fact that we return a empty json body even though the HTTP status code is 204 (no content). The content length header is also invalid which might cause issues on the client sending the request (content-length: 2).

This is due to the fact that Lodestar always adds an empty response body even if there is no return type https://github.com/ChainSafe/lodestar/blob/fa30bcf10086292883ef086202474ac4df67ffe1/packages/api/src/utils/server/genericJsonServer.ts#L53-L55

Expected behavior

Lodestar should not return an empty json body in 204 responses.

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

v1.12.0

nflaig avatar Nov 15 '23 16:11 nflaig

  • Will be resolved by https://github.com/ChainSafe/lodestar/pull/6080

nflaig avatar Dec 05 '23 14:12 nflaig