refactor path prefix code for simplicity, add tests, cargo fmt

This commit is contained in:
Chris Beck
2025-12-16 01:07:47 -07:00
parent e2d7d6bb8c
commit a5083c167c
2 changed files with 85 additions and 78 deletions
+4 -2
View File
@@ -10,7 +10,10 @@ use tokio_util::bytes::Buf;
use tracing::{error, info, warn};
/// Start http listening task
pub fn start_http_task(listener: TcpListener, gateway: Arc<Gateway>) -> tokio::task::JoinHandle<()> {
pub fn start_http_task(
listener: TcpListener,
gateway: Arc<Gateway>,
) -> tokio::task::JoinHandle<()> {
// Loop waiting for http incoming connections, and pass them to gateway
tokio::task::spawn(async move {
loop {
@@ -133,4 +136,3 @@ where
)),
}
}