MXS-1220: Reorganize request and response processing

The standard response headers are now generated at a higher level. This
reduces the scope of the HttpResponse class making it a leaner wrapper
around a few simple variables, namely the JSON body of the response.

The HttpRequest now exposes the Host header that the client sent. This
allows resource relations to be real links that work without modification.
This commit is contained in:
Markus Mäkelä
2017-04-19 10:07:08 +03:00
committed by Markus Mäkelä
parent 8c77e62872
commit 52e075963e
5 changed files with 52 additions and 45 deletions

View File

@ -89,6 +89,7 @@ HttpRequest::HttpRequest(struct MHD_Connection *connection, string url, string m
m_connection(connection)
{
process_uri(url, m_resource_parts);
m_hostname = get_header("Host");
}
HttpRequest::~HttpRequest()