mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-23 16:21:06 +01:00
cleanup
This commit is contained in:
parent
d77156c16c
commit
4913e7d3c2
@ -76,7 +76,7 @@ Each result is best of five runs. All measurements are req/sec.
|
||||
|
||||
Name | 1 thread | 1 pipeline | 3 thread | 3 pipeline | 8 thread | 8 pipeline
|
||||
---- | -------- | ---------- | -------- | ---------- | -------- | ----------
|
||||
Actix | 81.400 | 710.200 | 121.000 | 1.684.000 | 106.300 | 2.206.000
|
||||
Actix | 87.200 | 813.200 | 122.100 | 1.877.000 | 107.400 | 2.390.000
|
||||
Gotham | 61.000 | 178.000 | | | |
|
||||
Iron | | | | | 94.500 | 78.000
|
||||
Rocket | | | | | 95.500 | failed
|
||||
|
@ -539,13 +539,12 @@ impl Reader {
|
||||
}
|
||||
|
||||
// Parse http message
|
||||
let mut headers_indices = [HeaderIndices {
|
||||
name: (0, 0),
|
||||
value: (0, 0)
|
||||
}; MAX_HEADERS];
|
||||
let mut headers_indices: [HeaderIndices; MAX_HEADERS] =
|
||||
unsafe{std::mem::uninitialized()};
|
||||
|
||||
let (len, method, path, version, headers_len) = {
|
||||
let mut headers = [httparse::EMPTY_HEADER; MAX_HEADERS];
|
||||
let mut headers: [httparse::Header; MAX_HEADERS] =
|
||||
unsafe{std::mem::uninitialized()};
|
||||
let mut req = httparse::Request::new(&mut headers);
|
||||
match try!(req.parse(buf)) {
|
||||
httparse::Status::Complete(len) => {
|
||||
|
@ -131,7 +131,8 @@ impl Writer for H2Writer {
|
||||
if !msg.headers().contains_key(DATE) {
|
||||
let mut bytes = BytesMut::with_capacity(29);
|
||||
helpers::date(&mut bytes);
|
||||
msg.headers_mut().insert(DATE, HeaderValue::try_from(&bytes[..]).unwrap());
|
||||
msg.headers_mut().insert(
|
||||
DATE, HeaderValue::try_from(bytes.freeze()).unwrap());
|
||||
}
|
||||
|
||||
let mut resp = Response::new(());
|
||||
|
Loading…
Reference in New Issue
Block a user