| Vulnerabilities | |||||
|---|---|---|---|---|---|
| Version | Suggest | Low | Medium | High | Critical |
| 0.12.0 | 0 | 0 | 0 | 0 | 0 |
| 0.11.0 | 0 | 0 | 0 | 0 | 0 |
| 0.10.0 | 0 | 0 | 0 | 0 | 0 |
| 0.9.0 | 0 | 0 | 0 | 0 | 0 |
| 0.8.2 | 0 | 0 | 0 | 0 | 0 |
| 0.8.1 | 0 | 0 | 0 | 0 | 0 |
| 0.8.0 | 0 | 0 | 0 | 0 | 0 |
| 0.7.0 | 0 | 0 | 1 | 0 | 0 |
| 0.6.4 | 0 | 0 | 1 | 0 | 0 |
| 0.6.3 | 0 | 0 | 1 | 0 | 0 |
| 0.6.2 | 0 | 0 | 1 | 0 | 0 |
| 0.6.1 | 0 | 0 | 1 | 0 | 0 |
| 0.6.0 | 0 | 0 | 1 | 0 | 0 |
| 0.5.9 | 0 | 0 | 1 | 0 | 0 |
| 0.5.8 | 0 | 0 | 1 | 0 | 0 |
| 0.5.7 | 0 | 0 | 1 | 0 | 0 |
| 0.5.6 | 0 | 0 | 1 | 0 | 0 |
| 0.5.5 | 0 | 0 | 1 | 0 | 0 |
| 0.5.4 | 0 | 0 | 1 | 0 | 0 |
| 0.5.3 | 0 | 0 | 1 | 0 | 0 |
| 0.5.2 | 0 | 0 | 1 | 0 | 0 |
| 0.5.1 | 0 | 0 | 1 | 0 | 0 |
| 0.5.0 | 0 | 0 | 1 | 0 | 0 |
| 0.4.1 | 0 | 0 | 1 | 0 | 0 |
| 0.4.0 | 0 | 0 | 1 | 0 | 0 |
| 0.3.0 | 0 | 0 | 1 | 0 | 0 |
| 0.2.1 | 0 | 0 | 1 | 0 | 0 |
| 0.2.0 | 0 | 0 | 1 | 0 | 0 |
| 0.1.1 | 0 | 0 | 1 | 0 | 0 |
| 0.1.0 | 0 | 0 | 1 | 0 | 0 |
0.12.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseTiny but strong HTTP server in Rust. Its main objectives are to be 100% compliant with the HTTP standard and to provide an easy way to create an HTTP server.
What does tiny-http handle?
Connection: upgrade (used by websockets)Tiny-http handles everything that is related to client connections and data transfers and encoding.
Everything else (parsing the values of the headers, multipart data, routing, etags, cache-control, HTML templates, etc.) must be handled by your code. If you want to create a website in Rust, I strongly recommend using a framework instead of this library.
Add this to the Cargo.toml file of your project:
[dependencies]
tiny_http = "0.11"use tiny_http::{Server, Response};
let server = Server::http("0.0.0.0:8000").unwrap();
for request in server.incoming_requests() {
println!("received request! method: {:?}, url: {:?}, headers: {:?}",
request.method(),
request.url(),
request.headers()
);
let response = Response::from_string("hello world");
request.respond(response);
}Tiny-http was designed with speed in mind:
server.recv(). Tiny-http will automatically rearrange the responses
so that they are sent in the right order.Connection: close header),
the thread will immediately stop reading from this client and can be reclaimed, even when the
request has not yet been answered. The reading part of the socket will also be immediately closed.Examples of tiny-http in use:
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tiny-http by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.