diff --git a/ostp-client/src/transport/xhttp.rs b/ostp-client/src/transport/xhttp.rs index 9aad667..9fff768 100644 --- a/ostp-client/src/transport/xhttp.rs +++ b/ostp-client/src/transport/xhttp.rs @@ -88,10 +88,9 @@ pub async fn connect_xhttp( let http_host = if sni.is_empty() { target_ip.to_string() } else { sni.to_string() }; let req = format!( - "POST /stream HTTP/1.1\r\n\ + "GET /stream HTTP/1.1\r\n\ Host: {}\r\n\ Authorization: Bearer {}\r\n\ - Content-Length: 99999999999\r\n\ Connection: keep-alive\r\n\ \r\n", http_host, auth_token diff --git a/ostp-server/src/transport/uot.rs b/ostp-server/src/transport/uot.rs index 38173ab..f4bf0b4 100644 --- a/ostp-server/src/transport/uot.rs +++ b/ostp-server/src/transport/uot.rs @@ -38,7 +38,7 @@ pub async fn handle_tcp_connection( let headers_str = String::from_utf8_lossy(&buf[..header_len]); // Fast-fail scanner bots - if !headers_str.starts_with("POST /stream HTTP/1.1\r\n") { + if !headers_str.starts_with("GET /stream HTTP/1.1\r\n") { send_404(&mut stream).await?; anyhow::bail!("invalid request line"); } @@ -108,7 +108,7 @@ pub async fn handle_tcp_connection( } // Reply 200 OK - let response = "HTTP/1.1 200 OK\r\nX-Ostp-Server: 1\r\nContent-Length: 99999999999\r\nConnection: keep-alive\r\n\r\n"; + let response = "HTTP/1.1 200 OK\r\nX-Ostp-Server: 1\r\nConnection: keep-alive\r\n\r\n"; stream.write_all(response.as_bytes()).await?; info!("UoT client authenticated from {}", peer_addr);