aboutsummaryrefslogtreecommitdiff
path: root/src/router.rs
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2024-06-05 20:55:59 +0300
committeromagdy7 <omar.professional8777@gmail.com>2024-06-05 20:55:59 +0300
commit4e0078e7bac5a8b3e7e267a1562590d1300dac64 (patch)
tree0bb76af345d44c4ca2fae9be19f8cda897b886a8 /src/router.rs
parent07c54da628ec776627e68c25196539389c8d965c (diff)
downloadtiny-server-4e0078e7bac5a8b3e7e267a1562590d1300dac64.tar.xz
tiny-server-4e0078e7bac5a8b3e7e267a1562590d1300dac64.zip
feat: Added basic handling of Content-Encoding header
Diffstat (limited to 'src/router.rs')
-rw-r--r--src/router.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/router.rs b/src/router.rs
index cbbc64a..7b1313b 100644
--- a/src/router.rs
+++ b/src/router.rs
@@ -33,13 +33,11 @@ impl Router {
Get(route) => {
let re = build_regex_from_path(&route);
let meth = Get(re.to_string());
- dbg!(&meth);
self.routes.insert(meth, handler);
}
Post(route) => {
let re = build_regex_from_path(&route);
let meth = Post(re.to_string());
- dbg!(&meth);
self.routes.insert(meth, handler);
}
Put(_) => todo!(),
@@ -55,7 +53,7 @@ impl Router {
for (method, handler) in self.routes() {
if let Get(method_string) = method {
let re = Regex::new(method_string).unwrap();
- dbg!(&re, request_method);
+ // dbg!(&re, request_method);
if re.is_match(request_method) {
return handler(request, ctx);
}
@@ -67,7 +65,7 @@ impl Router {
for (method, handler) in self.routes() {
if let Post(method_string) = method {
let re = Regex::new(method_string).unwrap();
- dbg!(&re, request_method);
+ // dbg!(&re, request_method);
if re.is_match(request_method) {
return handler(request, ctx);
}