Implementing the HTTP server application
Nowadays, there are plenty of HTTP server applications available in the market. However, sometimes there is a need to implement a custom one. This could be a small and simple server, supporting a specific subset of HTTP protocol possibly with custom extensions, or maybe not an HTTP server but a server supporting a communication protocol, which is similar to HTTP or is based on it.
In this recipe, we will consider the implementation of basic HTTP server application using Boost.Asio. Here is the set of requirements that our application must satisfy:
- It should support the HTTP 1.1 protocol
- It should support the
GET
method - It should be able to process multiple requests in parallel, that is, it should be an asynchronous parallel server
In fact, we have already considered the implementation of the server application that partially fulfils specified requirements. In Chapter 4, Implementing Server Applications, the recipe named Implementing an asynchronous TCP...