-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-serverArea: server.Area: server.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.
Description
This method would be a guaranteed single write, so we could set the Content-Length
header, write the body, and then end()
the request.
Basically:
impl Response<Fresh> {
fn send(self, buf: &[u8]) -> io::Result<usize> {
self.headers.set(ContentLength(buf.len()));
try!(self.body.write_all(buf));
self.end();
Ok(buf.len())
}
}
Metadata
Metadata
Assignees
Labels
A-serverArea: server.Area: server.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.