rgw: Handle multiple listening addreses w/ optional ssl "correctly" with civetweb.
For civetweb: accept a range of port numbers joined with '+'.
Port numbers may include an ipaddress: prefix and 's' suffix.
Additionally, use "mg_get_local_addr" to correctly deduce host port per
incoming connection.
civetweb can accept connections on multiple ports, some of which
might have SSL turned on and some not. Both s3 and swift have various
authorization protocols in which the port number matters. In the generic
radosgw frontend process, each frontend only has one port number, but
we should want to have both ssl and non-ssl connections managed within
one rgw frontend, because the thread pool is also per front-end, and
that *is* a scarce resource.
So, this patch enables the use of multiple ports with a single civetweb
frontend. To indicate https: append an 's' to portno. To use multiple
ports, use +. So 80+443s indicates use of the usual default http ports.
The parsed port is not stored in the frontend structure,
So instead, this patch adds logic to use the results of
mg_get_local_addr() on a per-connection basis insetad of the generic
front-end port number. This will affect "v4" s3 authorization, and also
affect swift pre-signed URLs.
mg_get_local_addr() is a new customization to civetweb; that submodule
was updated (in a temporary repository) by the previous commit to this.
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit
8bc6decc0774fae9ac881f91e73da55deebe3360)