| <html lang="en"> | <html lang="en"> | ||||
| <head> | <head> | ||||
| <meta charset="utf-8"> | <meta charset="utf-8"> | ||||
| <title>Hello!</title> | |||||
| <title>Index!</title> | |||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| <h1>Hello!</h1> | <h1>Hello!</h1> | ||||
| <p>Hi from Rust</p> | |||||
| <p>This is the index page. It's different from the hello page.</p> | |||||
| </body> | </body> | ||||
| </html> | </html> |
| match caps { | match caps { | ||||
| Some(cap) => { | Some(cap) => { | ||||
| let c = cap.get(1).unwrap().as_str(); | let c = cap.get(1).unwrap().as_str(); | ||||
| println!("Asked to fetch {}", c); | |||||
| // println!("Asked to fetch {}", c); | |||||
| //assert!(Path::new(c).exists()); | //assert!(Path::new(c).exists()); | ||||
| if c == "" { | if c == "" { | ||||
| ("HTTP/1.1 200 OK\r\n\r\n", "index.html") | ("HTTP/1.1 200 OK\r\n\r\n", "index.html") |