Fail on HTTP Status 204 (No Content) Hello, I'm using Synadia Cloud which has a DELETE…
- User
Fail on HTTP Status 204 (No Content) Hello,
I'm using Synadia Cloud which has a
DELETEAPI that returns a response with no body.code$ restish synadia delete-nats-user --help Deletes a NATS user from an account ## Argument Schema: { user-id: (string) } ## Responses 204/400/401/403/404 Response has no bodyIn this case, it's expected to have an empty body. Nevertheless,
restishfails with the error:codeERROR: Parse response error ERROR: Caught error: EOFHere is the full log:
code - Assistant
I’ll trace the response decoding path, then add a focused regression test using the repository’s Restish test conventions. I’m using the
rsh-testskill because this is a CLI behavior bug requiring concise coverage. - Assistant
rgisn’t installed in this workspace, so I’m using targetedfind/grepsearches. The reported combination—204 plus an invalid gzip header on an empty body—points toward decompression being attempted before the no-content response is recognized; I’m verifying that in the current implementation. - Assistant
The current normalizer already accepts a plain empty 204, but it initializes the gzip decoder first; gzip initialization returns
EOFbefore Restish can observe that there is no body. I’m fixing this at the HTTP semantics boundary so body-forbidden responses (including 204 and HEAD responses) bypass decompression in normal, raw, and streaming-capable paths while preserving response headers. - Assistant
The focused output tests pass. The CLI package suite is still running; the regression now covers both Restish’s default non-TTY raw path and the explicit rendered-body path, since those previously reached decompression differently.
- Assistant
The complete fast suite passes. I also tightened the no-body streaming helper so it still closes the original response body, avoiding a resource leak in edge cases where a 204 is mislabeled as a streaming media type. I’m running the repository’s integration-tag suite now because CLI response behavior changed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.