Skip to content

425 Too Early

The server will not process a request sent in TLS early data, because an attacker could replay it.

What 425 Too Early means

TLS 1.3 lets clients send data in the first flight of a resumed connection (0-RTT early data). That saves a round trip, but the data can be replayed. A server that sees a risky request in early data can answer 425.

Proxies add Early-Data: 1 when they forward a request that arrived in early data. The client should retry after the TLS handshake completes.

Common causes

  • A non-idempotent request, such as a POST, sent in 0-RTT data.
  • A CDN or proxy forwarding an early-data request to an origin that refuses them.

How to fix 425 Too Early

  1. Retry the request. Well-behaved clients resend it automatically after the handshake.
  2. On the server, accept only safe, idempotent requests (like GET) in early data, or turn 0-RTT off.

Headers that go with it

  • Early-Data

Example response

HTTP/1.1 425 Too Early
Content-Type: text/plain; charset=utf-8

425 Too Early

How to check for a 425 response

cURL

# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

JavaScript (Node.js)

const res = await fetch("https://example.com/");
if (res.status === 425) {
  console.log(res.status, res.statusText);
}

Python

import requests

res = requests.get("https://example.com/")
if res.status_code == 425:
    print(res.status_code, res.reason)

Go

res, err := http.Get("https://example.com/")
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 425 {
	fmt.Println(res.Status)
}

Specification

425 Too Early is defined in RFC 8470, section 5.2.

  • 400

    Bad Request

    The server could not understand the request because something in it is malformed, like broken JSON, bad syntax or invalid headers.

  • 426

    Upgrade Required

    The server refuses to handle the request over the current protocol, and its Upgrade header names the protocol to switch to.

  • 503

    Service Unavailable

    The server cannot handle the request right now, usually because it is overloaded or down for maintenance. Try again later.

← all 63 HTTP status codes

Type to search posts, tools and projects.

Keyboard shortcuts

Search+Kor/
Go to homegthenh
Go to bloggthenb
Go to projectsgthenp
Go to timelinegthent
Show this help?
Close search or helpesc