diff --git a/server/fn.create_tls_acceptor.html b/server/fn.create_tls_acceptor.html index cb70fb09..485a8124 100644 --- a/server/fn.create_tls_acceptor.html +++ b/server/fn.create_tls_acceptor.html @@ -1 +1 @@ -create_tls_acceptor in server - Rust
server

Function create_tls_acceptor

Source
pub(crate) fn create_tls_acceptor() -> Result<TlsAcceptor, Box<dyn Error + Send + Sync>>
\ No newline at end of file +create_tls_acceptor in server - Rust
server

Function create_tls_acceptor

Source
pub(crate) fn create_tls_acceptor() -> Result<TlsAcceptor, Box<dyn Error + Send + Sync>>
\ No newline at end of file diff --git a/server/fn.handle_connection.html b/server/fn.handle_connection.html index 65eca4de..f8173a0e 100644 --- a/server/fn.handle_connection.html +++ b/server/fn.handle_connection.html @@ -1,4 +1,4 @@ -handle_connection in server - Rust
server

Function handle_connection

Source
pub(crate) async fn handle_connection(
+handle_connection in server - Rust
server

Function handle_connection

Source
pub(crate) async fn handle_connection(
     stream: TcpStream,
     acceptor: Arc<TlsAcceptor>,
 ) -> Result<(), Box<dyn Error + Send + Sync>>
\ No newline at end of file diff --git a/server/fn.main.html b/server/fn.main.html index 0ae0b835..66b80660 100644 --- a/server/fn.main.html +++ b/server/fn.main.html @@ -1 +1 @@ -main in server - Rust
server

Function main

Source
pub(crate) fn main() -> Result<(), Box<dyn Error + Send + Sync>>
\ No newline at end of file +main in server - Rust
server

Function main

Source
pub(crate) fn main() -> Result<(), Box<dyn Error + Send + Sync>>
\ No newline at end of file diff --git a/server/fn.process_command.html b/server/fn.process_command.html index 1fcae3d7..9b473312 100644 --- a/server/fn.process_command.html +++ b/server/fn.process_command.html @@ -1 +1 @@ -process_command in server - Rust
server

Function process_command

Source
pub(crate) async fn process_command(command: &str) -> Result<String, String>
\ No newline at end of file +process_command in server - Rust
server

Function process_command

Source
pub(crate) async fn process_command(command: &str) -> Result<String, String>
\ No newline at end of file diff --git a/server/index.html b/server/index.html index 4e59a21a..01197017 100644 --- a/server/index.html +++ b/server/index.html @@ -1 +1 @@ -server - Rust

Crate server

Source

Structsยง

Functionsยง

\ No newline at end of file +server - Rust

Crate server

Source

Structsยง

Functionsยง

\ No newline at end of file diff --git a/src/server/server.rs.html b/src/server/server.rs.html index 6752beae..a7a22e20 100644 --- a/src/server/server.rs.html +++ b/src/server/server.rs.html @@ -209,7 +209,13 @@ 208 209 210 -211
use std::env;
+211
+212
+213
+214
+215
+216
+217
use std::env;
 use std::io::Read;
 use std::sync::Arc;
 
@@ -288,7 +294,13 @@
         }
     };
 
-    stream.write_all(response.as_bytes()).await?;
+    let http_response = format!(
+        "HTTP/1.1 200 OK\r\nContent-Length: {}\r\n\r\n{}",
+        response.len(),
+        response
+    );
+    stream.write_all(http_response.as_bytes()).await?;
+
     Ok(())
 }