REFUSED_STREAM
REFUSED_STREAM (0x7) is sent in RST_STREAM when the server refuses a stream before any application processing has occurred. The key implication is that the client can safely retry the request on a new stream or connection – no side effects occurred on the server side.
Code
0x7
Decimal
7
Standard
RFC 9113 §7
Description
REFUSED_STREAM is HTTP/2's safe-to-retry signal. When a server sends RST_STREAM with REFUSED_STREAM, it guarantees the request was never processed by the application layer. This allows clients and proxies to retry requests unconditionally, even for non-idempotent methods like POST. Common causes: the server is at its concurrent stream limit (SETTINGS_MAX_CONCURRENT_STREAMS), the server is shutting down and refusing new streams, or a load balancer is redistributing connections. Unlike CANCEL (0x8), REFUSED_STREAM explicitly permits retry.
Common Causes
- –Server at SETTINGS_MAX_CONCURRENT_STREAMS limit
- –Server shutting down and refusing new streams
- –Load balancer redistributing connection before processing began
- –Server restarting and declining streams on the old connection