rust-web-server 17.61.0

A dependency-minimal Rust web platform: HTTP/1.1, HTTP/2, and HTTP/3 server, reverse proxy, and application framework with routing, middleware (auth, rate limiting, tracing), an async ORM, background jobs, object storage, and a mailer. Runs as a zero-code config-driven proxy or as a library crate. No third-party HTTP dependencies.
Documentation
use crate::entry_point::{bootstrap, get_ip_port_thread_count, get_max_body_size, Config};

#[test]
fn base(){
    let _g = crate::test_env::lock();
    bootstrap();
    get_ip_port_thread_count();
}

#[test]
fn get_max_body_size_defaults_to_unlimited() {
    let _g = crate::test_env::lock();
    std::env::remove_var(Config::RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES);
    assert_eq!(0, get_max_body_size());
}

#[test]
fn get_max_body_size_reads_env_var() {
    let _g = crate::test_env::lock();
    std::env::set_var(Config::RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES, "1048576");
    assert_eq!(1048576, get_max_body_size());
    std::env::remove_var(Config::RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES);
}

#[test]
fn get_max_body_size_falls_back_to_unlimited_on_unparseable_value() {
    let _g = crate::test_env::lock();
    std::env::set_var(Config::RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES, "not-a-number");
    assert_eq!(0, get_max_body_size());
    std::env::remove_var(Config::RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES);
}