spacegate-kernel 0.2.0-alpha.4

A library-first, lightweight, high-performance, cloud-native supported API gateway
Documentation
1
2
3
4
5
6
7
8
9
10
use hyper::Version;

use crate::SgRequest;

pub fn h2_downgrade(request: &mut SgRequest) {
    let version = request.version();
    if matches!(version, Version::HTTP_2) {
        *request.version_mut() = Version::HTTP_11;
    }
}