- Software and digital services
- HTTP service
204
HTTP 204 No Content: successful request with empty body
Risk level
Low
Usually safe to check without specialist tools.
Urgency
Medium
Quick answer
HTTP 204 (No Content) means the server fulfilled your request and intentionally sent no response body. Check whether your client code tries to parse JSON on 204, inspect response headers such as ETag, and record the HTTP exchange before changing the endpoint.
Safety first
Stop and check this first
- Do not attempt to disable authentication, CORS, or cache validators to troubleshoot HTTP 204; it is an IANA-registered 2xx success code, not an access failure.
- Never configure a server or proxy to send a Content-Length header field or dummy body bytes inside a 204 (No Content) response; RFC 9110 Section 8.6 warns that inconsistent Content-Length framing across intermediaries can cause request smuggling or response splitting.
Safe checks you can perform
- Inspect the raw 204 response headers and framing in browser DevTools or curl
- Check whether the client parser branches on status 204 before reading the body
- Verify that the target resource state updated as indicated by 204 metadata
Leave these tasks to a qualified professional
- Do not attempt this professional task: Update client HTTP handling to treat 204 as a bodyless success and apply headers
- Do not attempt this professional task: Remove Content-Length and body generation from server or proxy 204 responses
What a technician must be able to justify
Technician visit
These are the steps they must carry out and show you. Tick them as they work: if steps are skipped, do not accept a part swap.
These are not instructions for opening or handling the equipment yourself. They are the checks that should support a technical conclusion.
Update client HTTP handling to treat 204 as a bodyless success and apply headers
What they doHave the client or frontend developer branch on HTTP 204 before invoking any content parser, keep the current document view active, and apply updated response headers such as ETag to the active representation.
They must show youa test trace where the client receives HTTP 204, updates its stored ETag metadata, and completes without a parser exception.
In writingthe pull request or commit reference updating the 204 handler and the verified API contract for that route.
Remove Content-Length and body generation from server or proxy 204 responses
What they doHave the backend developer or platform administrator fix any route or gateway filter that attaches a Content-Length header field or response body when returning status 204, or switch the status to 200 OK if a body is required.
They must show youa raw HTTP response capture from the origin and proxy showing HTTP 204 terminated at the end of the header section with no Content-Length field.
In writingthe server or gateway configuration change applied and the deployment version where compliant 204 framing was verified.
Before accepting a part or repair
Nothing has been shown yet. Do not accept a part swap based on the code alone.
Follow these steps
Note: Follow the documented order. An error code identifies the affected system, but it does not prove by itself which part has failed.
Inspect the raw 204 response headers and framing in browser DevTools or curl
- Who:
- Your web developer or API integrator inspecting the network capture.
- How:
- Capture one 204 response in the browser Network tab or with curl -i and inspect the header section for ETag, Cache-Control, and any prohibited Content-Length header or trailing body bytes.
- Result that matters:
- You verify whether the server terminated the 204 message cleanly at the end of the header section without sending Content-Length or content.
- If the 204 response includes a Content-Length header field or payload bytes after the header section, that confirms the origin server or reverse proxy violates RFC 9110 Section 8.6 and Section 15.3.5.
- If the 204 response ends immediately after the header section with no Content-Length and carries updated metadata such as ETag, that rules out a framing violation on the server.
- Evidence to keep:
- Save the redacted request method, URI path, and raw 204 response header lines with timestamp.
Never include session cookies, bearer tokens, or API keys when saving raw HTTP traces for troubleshooting.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · RFC 9110 section 8.6 - Content-Length
Check whether the client parser branches on status 204 before reading the body
- Who:
- Your frontend or client SDK developer reviewing the HTTP response handler.
- How:
- Locate the fetch, XHR, or HTTP client callback that processes the endpoint and check whether it calls response.json() or decodes a stream before checking for status 204.
- Result that matters:
- You see whether the application failure is raised by the local parser after receiving a valid empty 204 response.
- If the client calls a JSON decoder on every 2xx status without skipping 204, that confirms the error is caused by client-side body parsing of an intentionally empty response.
- If the client already skips body decoding on 204 yet the UI expects a newly created record payload, that points to an API contract mismatch between 204 No Content and 200 OK.
- Evidence to keep:
- Keep the client stack trace and the exact source lines where the HTTP response status is handled.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · IANA Hypertext Transfer Protocol Status Code Registry
Verify that the target resource state updated as indicated by 204 metadata
- Who:
- You or your developer checking the resource state after the action.
- How:
- Compare the ETag header returned on the 204 response (for example after a PUT save) or perform one read-only GET on the target URI to see if the modification took effect.
- Result that matters:
- RFC 9110 Section 15.3.5 states that metadata in 204 header fields refer to the target resource and its selected representation after the requested action was applied.
- If the 204 response carries a new ETag or the follow-up GET reflects the saved change, that confirms the server fulfilled the request and no retry is needed.
- If the server returned 204 on a read query that was supposed to return a representation or did not apply the state change, that isolates the issue to the backend route handler.
- Evidence to keep:
- Record the before-and-after ETag values and the status of the verification GET request.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · RFC 9110 section 9.3.4 - PUT
Still not solved
If the error persists, stop here. See what the technician must do and show you.
Where this code applies
A code is meaningful only inside the right product and version context.
Primary scope
- System
- Software and digital services
- Brand
- HTTP
- Product type
- HTTP service
Known code variants
- 204 Aucun contenu
- 204 Kein Inhalt
- 204 Nessun contenuto
- 204 No Content
- 204 Sin contenido
- código HTTP 204
- error HTTP 204
- HTTP 204
- HTTP error 204
- HTTP status 204
- status code 204
What it means
Defined in RFC 9110 Section 15.3.5 and registered by IANA under 2xx Successful, HTTP 204 (No Content) indicates the origin server fulfilled the request and has no additional content to send in the response payload. A 204 message terminates at the end of the header section, cannot contain content or trailers, and according to Section 8.6 the server must not send a Content-Length header field in any 204 response. Header metadata such as ETag after a PUT applies to the target resource after the action. Receiving 204 alone never proves a server or network failure.
Warnings and stop conditions
- Loweditorial warning
Do not attempt to disable authentication, CORS, or cache validators to troubleshoot HTTP 204; it is an IANA-registered 2xx success code, not an access failure.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · IANA Hypertext Transfer Protocol Status Code Registry
- Mediumsource verified
Never configure a server or proxy to send a Content-Length header field or dummy body bytes inside a 204 (No Content) response; RFC 9110 Section 8.6 warns that inconsistent Content-Length framing across intermediaries can cause request smuggling or response splitting.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · RFC 9110 section 8.6 - Content-Length
Symptoms and causes
Probable causes · in order
- Intentional empty 2xx completion after PUT, DELETE, or document saveConfirmed
RFC 9110 Section 15.3.5 and Section 9.3.4 specify 204 (No Content) when a server applies an edit or state change to the target resource and wants the user agent to remain on its current document view without transferring a representation.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · IANA Hypertext Transfer Protocol Status Code Registry · RFC 9110 section 9.3.4 - PUT
- Client response handler attempting to decode JSON from a header-only 204 messageCommon
Because a 204 response is terminated at the end of the header section and cannot contain content or trailers, any client or SDK that unconditionally runs a JSON or XML parser on every 2xx status throws a syntax exception.
Evidence: RFC 9110 section 15.3.5 - 204 No Content
- Origin server or proxy sending illegal Content-Length or payload bytes with 204Possible
RFC 9110 Section 8.6 states that a server must not send a Content-Length header field in any 204 response, and extra bytes or mismatched framing headers can cause downstream intermediaries or strict HTTP parsers to fail.
Evidence: RFC 9110 section 15.3.5 - 204 No Content · RFC 9110 section 8.6 - Content-Length
Virtual technician
Does 204 still appear after these checks?
Answer a few questions to narrow down the likely cause and the safest next action. Guidance only - it never replaces a professional.
Sources and technical references
- 1
RFC 9110 section 15.3.5 - 204 No Content
Internet Engineering Task Force · 2022 · official_doc
- 2
IANA Hypertext Transfer Protocol Status Code Registry
Internet Assigned Numbers Authority · 2025 · official_doc
Was this entry useful?