Skip to content

/codes/nginx/nginx-special-status-codes

nginx status codes 444, 499, 413 and 494-497

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · nginx version: nginx/1.30.6updated 2026-10-20
tool
nginx
versions
nginx 1.x
os
any

Besides the standard HTTP codes, nginx uses a few codes of its own. They mostly appear in the access log, not in responses: 444 sends nothing at all, and 499 is logged when the client disconnected before nginx could answer.

nginx-specific codes

CodeMeaningWhat the client sees
444return 444; closes the connection without sending a responseempty reply (curl exit 52)
494request header too large (large_client_header_buffers)400 Bad Request
495client certificate verification failed400 Bad Request
496client did not send a required certificate400 Bad Request
497plain HTTP request sent to an HTTPS port400 Bad Request
499client closed the connection before the responsenothing (it already left)

The 494–497 codes can be caught with error_page 497 https://$host$request_uri; to redirect plain HTTP on the TLS port.

444, 413 and 499 on a real nginx

bash
mkdir -p logs temp
cat > slow.js <<'EOF'
const s = require("http").createServer((req, res) => setTimeout(() => res.end("late\n"), 2000));
s.listen(3911, "127.0.0.1");
setTimeout(() => process.exit(0), 5000);
EOF
cat > nginx.conf <<'EOF'
pid logs/nginx.pid;
events {}
http {
  log_format short '$request_method $uri $status';
  access_log logs/access.log short;
  client_max_body_size 1k;
  server {
    listen 127.0.0.1:3912;
    location /drop   { return 444; }
    location /upload { return 200 "stored\n"; }
    location /slow   { proxy_pass http://127.0.0.1:3911; }
  }
}
EOF
node slow.js &
nginx -p . -c nginx.conf -e logs/error.log &
sleep 1
curl -s http://127.0.0.1:3912/drop; echo "curl exit status: $?"
head -c 4096 /dev/zero | curl -s -o /dev/null -w 'upload 4 KiB: %{http_code}\n' --data-binary @- http://127.0.0.1:3912/upload
curl -s --max-time 1 http://127.0.0.1:3912/slow; echo "curl exit status: $?"
sleep 1
nginx -p . -c nginx.conf -e logs/error.log -s stop
echo "--- access.log"; cat logs/access.log

Output

curl exit status: 52
upload 4 KiB: 413
curl exit status: 28
--- access.log
GET /drop 444
POST /upload 413
GET /slow 499

413 Request Entity Too Large is a standard code (RFC 9110 calls it Content Too Large); nginx returns it when the body exceeds client_max_body_size, 1 MiB by default.

Sources