HTTP errors

HTTP status codes from 400 Bad Request to 504 Gateway Timeout — what they mean and how to fix them on any server.

CodeErrorWhat it means
494 nginx 494 Request Header Or Cookie Too Large nginx's internal code for a request whose headers or cookies exceed the buffer limit.
301/302 POST request turns into GET after a redirect (body lost) A form or API POST is redirected, and the browser repeats it as GET without the body.
CSP Refused to execute inline script because it violates the Content Security Policy The page's Content-Security-Policy forbids inline scripts, so the browser blocked yours.
Set-Cookie Set-Cookie ignored on cross-origin fetch (missing credentials / CORS credentials) The API sends a cookie, but a cross-origin fetch/XHR doesn't store or send it.
404 Soft 404: page returns 200 for missing content A page that says "not found" but sends a 200 status, so search engines and monitors think it exists.
WebSocket 1006 WebSocket closed with code 1006 (abnormal closure) The WebSocket connection dropped without a proper close handshake.
404 404 only with or without a trailing slash /about works but /about/ returns 404 (or the other way round).
504 504 Gateway Timeout from load balancer idle timeout (long request) A request ran longer than the load balancer's idle timeout, so it was cut with a 504.
Cache-Control Back/forward cache blocked by Cache-Control: no-store (stale or reloaded page on Back) Pressing Back reloads the page from scratch instead of restoring it instantly, or shows stale/old data.
Accept-Encoding Brotli/gzip compression not applied (large uncompressed responses) Responses are sent uncompressed, so pages are slower and bandwidth higher than necessary.
Cache-Control CDN not caching: Cache-Control private / no-cache / Set-Cookie on the response The response tells shared caches not to store it, so the CDN passes every request to your origin.
Cookie Cookie expires immediately or never because of clock skew or a wrong Expires date A cookie vanishes right after login, or stays when it shouldn't, because the browser and server clocks disagr…
CORS on errors CORS error hides the real failure: Access-Control-Allow-Origin is missing on 4xx/5xx responses The browser reports a CORS error, but the real problem is a server error (500, 401, 404) whose response carri…
Vary: Origin CORS responses cached for the wrong origin (missing Vary: Origin) A cache or CDN stored a CORS response for one origin and served it to another, so some sites get blocked.
CORS CORS: Redirect is not allowed for a preflight request The server answered the OPTIONS preflight with a redirect, which browsers refuse to follow.
CORS CORS: Request header field is not allowed by Access-Control-Allow-Headers in preflight response Your request adds a custom header (Authorization, X-Api-Key, Content-Type: application/json) the server didn'…
CORS preflight CORS: Response to preflight request doesn't pass access control check: no HTTP ok status The browser's OPTIONS preflight got an error status (401, 403, 404, 405, 500) instead of 2xx.
CORS CORS: The 'Access-Control-Allow-Origin' header contains multiple values The response carries the CORS header twice (or a comma-separated list), which browsers reject.
CORS CORS: wildcard '*' not allowed when the request's credentials mode is 'include' The server answered `Access-Control-Allow-Origin: *`, but credentialed requests (cookies, Authorization) requ…
Content-Encoding Garbled response: content compressed twice (double gzip) The body is compressed twice, so the client decodes once and still sees binary gibberish.
Accept-Ranges HTML5 video can't seek or won't play: missing Accept-Ranges / wrong Content-Type A video plays from the start but jumping ahead fails, or Safari refuses to play it at all.
102 HTTP 102 Processing An interim WebDAV response saying the server accepted a long-running request and is still working on it.
205 HTTP 205 Reset Content The request succeeded and the client should reset the form or view that sent it.
599 HTTP 599 Network Connect Timeout Error A non-standard code some proxies and libraries use when they couldn't connect to the upstream in time.
CL.TE HTTP request smuggling: Content-Length vs Transfer-Encoding mismatch Two servers in a chain disagree about where a request ends, letting an attacker hide a second request inside…
HTTP/2 header list HTTP/2 header list size exceeded (431 / COMPRESSION_ERROR) The request or response headers, after HPACK decoding, are larger than the peer allows.
RST_STREAM HTTP/2 RST_STREAM (REFUSED_STREAM / CANCEL / INTERNAL_ERROR) One HTTP/2 stream was reset by the peer, while the connection itself stays open.
Range Range request ignored: server returns 200 instead of 206 Partial Content The client asked for part of a file, but the server sent the whole thing with 200.
Redirect chain Redirect chain: http → https → www (multiple hops slow the page) A single URL goes through several redirects before the final page loads.
Location Redirect goes to the wrong host, port or scheme (bad Location header) The Location header sends the browser to an internal hostname, localhost, the wrong port or http instead of h…
Referrer-Policy Referer header missing or truncated: Referrer-Policy strips it Your analytics, hotlink protection or CSRF check sees an empty or origin-only Referer because browsers apply…
If-Range Resumed download restarts from zero (If-Range validator mismatch) A download manager tries to resume, but the server sends the full file again because the validator no longer…
Server header Security scan: Server / X-Powered-By header discloses software version Response headers reveal the exact web server or framework version, helping attackers pick known exploits.
Strict-Transport-Security Security scan: Strict-Transport-Security (HSTS) header missing The site doesn't tell browsers to always use HTTPS, so a first visit over HTTP can be intercepted (SSL stripp…
COOP/COEP SharedArrayBuffer is not defined: cross-origin isolation headers missing (COOP/COEP) Features like SharedArrayBuffer, high-resolution timers or WASM threads are disabled because the page isn't c…
#fragment The #fragment part of the URL never reaches the server (hash/anchor ignored in logs and redirects) Everything after # stays in the browser, so the server can't see it, route on it, or log it.