Browse Source

Got the damn thing working

master
Noelle 4 years ago
parent
commit
2ffa986c6e
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      index.html
  2. 1
    1
      src/main.rs

+ 2
- 2
index.html View File

@@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello!</title>
<title>Index!</title>
</head>
<body>
<h1>Hello!</h1>
<p>Hi from Rust</p>
<p>This is the index page. It's different from the hello page.</p>
</body>
</html>

+ 1
- 1
src/main.rs View File

@@ -40,7 +40,7 @@ fn handle_connection(mut stream: TcpStream) {
match caps {
Some(cap) => {
let c = cap.get(1).unwrap().as_str();
println!("Asked to fetch {}", c);
// println!("Asked to fetch {}", c);
//assert!(Path::new(c).exists());
if c == "" {
("HTTP/1.1 200 OK\r\n\r\n", "index.html")

Loading…
Cancel
Save