forked from xavi/libweb
Xavier Del Campo Romero
65031ca350
Even if libweb already parses some common headers, such as Content-Length, some users might find it interesting to inspect which headers were received from a request. Since HTTP/1.1 does not define a limit on the number of maximum headers a client can send, for security reasons a maximum value must be provided by the user. Any extra headers shall be then discarded by libweb. An example application showing this new feature is also provided. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Makefile | ||
README.md | ||
main.c |
README.md
HTTP headers example
This example shows a HTTP/1.1 server that listens to port 8080
and prints
the headers received from the client (up to a maximum of max_headers
) to
standard output.
How to build
If using make(1)
, just run make
from this directory.
If using CMake, examples are built by default when configuring the project
from the top-level CMakeLists.txt
.
How to run
Run the executable without any command line arguments.