Track HTTP persistence and upgrade intent separately
Author: robjtedeCreated Sep 27, 2026Updated Sep 27, 2026
ConnectionType currently represents Close, KeepAlive, and Upgrade as mutually exclusive states. HTTP persistence and upgrade intent are separate properties: a request can contain both close and upgrade tokens.
For v5.0, represent these properties independently. close should disable reuse for further HTTP requests without erasing the upgrade request. A normal final response closes the connection; an accepted upgrade hands the connection to the new protocol.
This came up while reviewing the Connection parsing changes in #4278 (split from #4179). The intent is to make the model explicit and keep upgrade detection separate from the persistence decision.
Source: actix/actix-web