summaryrefslogtreecommitdiff
path: root/spider/src/http_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'spider/src/http_server.rs')
-rw-r--r--spider/src/http_server.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/spider/src/http_server.rs b/spider/src/http_server.rs
index a3f4bc2..12c410f 100644
--- a/spider/src/http_server.rs
+++ b/spider/src/http_server.rs
@@ -44,6 +44,7 @@ impl<T> HttpServer<T> where T: HttpHandler {
Ok(s) => {
println!("Got connection!");
self.handle_client(&s);
+ // TODO(andrew): handle possible errors.
s.shutdown(Shutdown::Both);
println!("Connection hadled");
},
@@ -78,6 +79,7 @@ impl<T> HttpServer<T> where T: HttpHandler {
HttpMethod::POST => self.handler.do_post(request)
};
let response = response.format();
- stream.write(response);
+ // TODO(andrew): handle possible errors.
+ stream.write(&response);
}
}