tedjp / shitty

C++ HTTP/2 & HTTP/1 server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shitty — A C++ HTTP Server

Examples

A simple example of serving static responses.

A simple HTTP proxy.

Prints incoming requests.

Dependencies

C++20

A C++20-capable compiler is required. I suggest GCC 10 or later.

As of early 2021, you might need to install a newer compiler than you already have, for example from Debian experimental or Ubuntu toolchain-r.

Included dependencies

fb64 is required for HTTP/2 upgrade.

Clone submodules to ensure it's available:

git submodule init
git submodule update

Build

CMake

cmake -B build
make -C build

Executables are output to the build directory.

Makefiles (deprecated)

The old Makefile build system might still work. Like this:

make depend
make

Run

When built with CMake build:

build/hello-world

Makefile build:

./hello-world

The server will bind port 80 if possible, otherwise it binds port 8080.

HPACK — HTTP/2 header compression

Includes a functional implementation of HPACK, HTTP/2's header compression/decompression algorithm. Integration and implementation of HTTP/2 is underway.

See dependencies/hpack for the HPACK implementation.

About

C++ HTTP/2 & HTTP/1 server

License:GNU Lesser General Public License v3.0


Languages

Language:C++ 96.3%Language:CMake 1.8%Language:Makefile 1.7%Language:Shell 0.3%