41 releases (4 breaking)

0.6.18 Sep 4, 2024
0.6.17 Sep 4, 2024
0.6.2 Aug 31, 2024
0.5.1 Aug 26, 2024
0.1.12 Aug 21, 2024

#664 in Web programming

Download history 1548/week @ 2024-08-17 1058/week @ 2024-08-24 2240/week @ 2024-08-31 164/week @ 2024-09-07

5,010 downloads per month
Used in parrot-network

MIT license

285KB
3.5K SLoC

h10

Simple HTTP/1.0 Server with no external dependencies (WIP)

Getting Started

Installation

cargo install h10

Installed mode

./h10-server --ip-address=127.0.0.1 --port=9000 

or

./h10-server --help

Caution

The usage of --http1.0 argument will make the request from browsers return 400 (Bad Request) code.

./h10-server --http1.0 --ip-address=127.0.0.1 --port=9000 

Usage

h10 (v0.3.4): Simple HTTP/1.0 Server - https://github.com/ancos2505/h10

Usage: h10-server [OPTION]

Options:
  --help                      Display this message

  --verbose                   Show raw contents from both Request and Response

  --http1.0                   Enable strict HTTP/1.0 strict mode (RFC1945)
                              WARNING: The nowday's browsers doesn't use it anymore

  --ip-address=<IP ADDRESS>   IPv4 or IPv6 to listening

  --port=<PORT NUMBER>        Port to listen [1024-65535] (RFC7605#section-4)

Dev mode

Terminal 1

cargo run

Terminal 2

curl -v localhost:8080

or open in your browser: http://localhost:8080/

Opened in browser

Roadmap

  • Serve static files sandboxed in a specific folder
  • Upload files
  • Implement the complete spec RFC1945

Dependencies