Skip to main content
0x8

CANCEL

Stream-levelRFC 9113 §7

CANCEL (0x8) is sent in RST_STREAM when the sender no longer needs a stream – a client canceling a request it no longer wants, or a server canceling a pushed resource the client doesn't want. Unlike REFUSED_STREAM, CANCEL does not guarantee safety to retry – the request may have been partially processed.

Code

0x8

Decimal

8

Standard

RFC 9113 §7

Description

CANCEL is the general-purpose stream cancellation code. It indicates the sender has lost interest in the stream but does not imply a protocol error. A client sends CANCEL to abort a long-running download. A server sends CANCEL to abort a server push (PUSH_PROMISE) that the client rejected with RST_STREAM CANCEL. CANCEL does not guarantee the request was unprocessed – for safe retry guarantees, the server must explicitly send REFUSED_STREAM. HTTP/2 clients receiving CANCEL for a POST should not automatically retry without checking idempotency.

Common Causes

  • Client no longer needs a response (navigation change, timeout)
  • Client rejected a server push with RST_STREAM CANCEL
  • Server abandoning a push stream
  • Client closed the browser tab mid-request