cellos-supervisor 0.5.1

CellOS execution-cell runner — boots cells in Firecracker microVMs or gVisor, enforces narrow typed authority, emits signed CloudEvents.
Documentation
//! HPACK static table (RFC 7541 Appendix A).
//!
//! Phase 3g lookups need only `(name, value)` pairs by index — the table is
//! immutable and the entries we'll match against (`:authority`, etc.) are
//! known at compile time. We carry the full 61 rows so the dynamic-table
//! lookup function can fall through to the static side without a separate
//! code path.

/// Highest defined HPACK static-table index (RFC 7541 Appendix A).
/// Indices 1..=61 are static; index ≥ 62 is dynamic.
pub const STATIC_TABLE_MAX: u64 = 61;

/// HPACK static-table index of the `:authority` pseudo-header
/// (RFC 7541 Appendix A row 1).
pub const STATIC_INDEX_AUTHORITY: u64 = 1;

/// RFC 7541 Appendix A — full 61-entry static table. Index `i` (1-based)
/// corresponds to slot `[i - 1]`.
pub const STATIC_TABLE: &[(&str, &str)] = &[
    (":authority", ""),
    (":method", "GET"),
    (":method", "POST"),
    (":path", "/"),
    (":path", "/index.html"),
    (":scheme", "http"),
    (":scheme", "https"),
    (":status", "200"),
    (":status", "204"),
    (":status", "206"),
    (":status", "304"),
    (":status", "400"),
    (":status", "404"),
    (":status", "500"),
    ("accept-charset", ""),
    ("accept-encoding", "gzip, deflate"),
    ("accept-language", ""),
    ("accept-ranges", ""),
    ("accept", ""),
    ("access-control-allow-origin", ""),
    ("age", ""),
    ("allow", ""),
    ("authorization", ""),
    ("cache-control", ""),
    ("content-disposition", ""),
    ("content-encoding", ""),
    ("content-language", ""),
    ("content-length", ""),
    ("content-location", ""),
    ("content-range", ""),
    ("content-type", ""),
    ("cookie", ""),
    ("date", ""),
    ("etag", ""),
    ("expect", ""),
    ("expires", ""),
    ("from", ""),
    ("host", ""),
    ("if-match", ""),
    ("if-modified-since", ""),
    ("if-none-match", ""),
    ("if-range", ""),
    ("if-unmodified-since", ""),
    ("last-modified", ""),
    ("link", ""),
    ("location", ""),
    ("max-forwards", ""),
    ("proxy-authenticate", ""),
    ("proxy-authorization", ""),
    ("range", ""),
    ("referer", ""),
    ("refresh", ""),
    ("retry-after", ""),
    ("server", ""),
    ("set-cookie", ""),
    ("strict-transport-security", ""),
    ("transfer-encoding", ""),
    ("user-agent", ""),
    ("vary", ""),
    ("via", ""),
    ("www-authenticate", ""),
];

/// Look up a 1-based static-table index. Returns `None` for `idx == 0` (HPACK
/// reserves index 0) or `idx > STATIC_TABLE_MAX`.
pub fn lookup_static(idx: u64) -> Option<&'static (&'static str, &'static str)> {
    if idx == 0 || idx > STATIC_TABLE_MAX {
        return None;
    }
    STATIC_TABLE.get((idx - 1) as usize)
}