Commit Graph

64 Commits

Author SHA1 Message Date
Liu Jiang
ac3bb940ab Import http routes from Cloud Hypervisor project
Import vmm/src/api/http.rs from Cloud Hyerpvisor project, commit
345c922cb9a88183e2da9d29230ecb945b0a6452 with following changes:
1) use generic type for handler argument.
2) remove server thread relative code.
3) add unit test cases.
4) refine for better code reuse.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-03-30 13:52:34 +03:00
Liu Jiang
31bc6268c7 Unregister fd from epoll_fd when closing a connection
When closing a http connection, the corresponding file descriptor
should be unregistered from the epoll fd.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-03-30 13:52:34 +03:00
Liu Jiang
3832d38d8c Reject negative content length in http header
It's almost an illegal input for a Content-Length header with negative
value, so reject it. Otherwise it may cause unexpected behavor when
parsing/receiving http requests.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-03-30 13:52:34 +03:00
Liu Jiang
aefdd1be46 Refine documentation according to latest code
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-03-30 13:52:34 +03:00
Liu Jiang
fbb4d5392a Refine code for rust edition 2018
Refine code to support rust edition 2018, no functional changes.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-03-30 13:52:34 +03:00
Andreea Florescu
e89ed14707 added readme file
The readme is still WIP, but it was added so that we can have links
to the other documents in the repository.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
460020a10f added security policy document
This is adapted from firecracker's security policy document.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
0f741b9d2b added a basic changelog file
Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
e8c0f8eaf0 added license
Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
da92575813 added contribution guidelines
The contribution guidelines are adapted from the firecracker
repository.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
ac31e5745f added github issue template
Adjusted the github issue template from Firecracker.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-03-24 18:22:44 +02:00
Andreea Florescu
e712d6ae23 fix link issues on aarch64 musl
The linker was unable to find __addtf3, __multf3 and __subtf3.

Added target-feature=+crt-static and link-arg=-lgcc as a temporary
workaround. This seems to be the accepted fix in the Rust community:
rust-lang-nursery/compiler-builtins#201

A permanent fix is yet to be implemented in the Rust compiler.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-01-30 15:21:04 +02:00
Andreea Florescu
fc538a8ba0 Added Buildkite CI
It's easier to test this with the rust-vmm-ci directly as it already
runs all the basic tests.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-01-30 15:21:04 +02:00
Andreea Florescu
6708271862 initial commit
Pulled the code from firecracker-microvm/src/micro-http.

Signed-off-by: George Pisaltu <gpl@amazon.com>
Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-01-27 12:28:50 +02:00