diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2024-06-05 20:59:13 +0300 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2024-06-05 20:59:13 +0300 |
| commit | c119c9cc4c1b3b01a7c1851993dde0264ad06733 (patch) | |
| tree | eb1b5c4669940dcf5f8c4b5c550b0e3de945f264 | |
| parent | c79e7fa761196e50407c5de18977a4f9d40445c9 (diff) | |
| download | tiny-server-c119c9cc4c1b3b01a7c1851993dde0264ad06733.tar.xz tiny-server-c119c9cc4c1b3b01a7c1851993dde0264ad06733.zip | |
feat: Added handling for Multiple compression schemes
| -rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 9735fda..24c75a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ fn handle_echo(request: &Request, ctx: Option<&HashMap<String, String>>) -> Resp }; if let Some(encoding) = request.get_tag("Accept-Encoding") { - if encoding.as_str() == "gzip" { + if encoding.contains("gzip") { headers.insert("Content-Encoding".to_string(), "gzip".to_string()); } } |
