aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 04:16:22 +0000
committerFuwn <[email protected]>2022-03-27 04:16:22 +0000
commitc01d0ae46a4a3a1d85cab9a49442283718b1fb88 (patch)
tree2dd7576792a406d8264c39fcaaf5728826102673 /src/lib.rs
parentrefactor(router): more generic errors (diff)
downloadwindmark-c01d0ae46a4a3a1d85cab9a49442283718b1fb88.tar.xz
windmark-c01d0ae46a4a3a1d85cab9a49442283718b1fb88.zip
feat(response): implement many more responses
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0814667..cb28717 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -328,12 +328,12 @@ impl Router {
"{}{}\r\n{}",
response_status,
match response_status {
- 10 | 11 | 40 | 50 | 51 => &*content,
- _ => " text/gemini; charset=utf-8",
+ 20 => " text/gemini; charset=utf-8",
+ _ => &*content,
},
match response_status {
- 10 | 11 | 40 | 50 | 51 => "".to_string(),
- _ => format!("{}{}{}", header, content, footer),
+ 20 => format!("{}{}{}", header, content, footer),
+ _ => "".to_string(),
}
)
.as_bytes(),