MCPcopy Create free account
hub / github.com/apache/httpd / ap_parse_vhost_addrs

Function ap_parse_vhost_addrs

server/vhost.c:242–267  ·  view source on GitHub ↗

parse the addresses */

Source from the content-addressed store, hash-verified

240
241/* parse the <VirtualHost> addresses */
242const char *ap_parse_vhost_addrs(apr_pool_t *p,
243 const char *hostname,
244 server_rec *s)
245{
246 server_addr_rec **addrs;
247 const char *err;
248
249 /* start the list of addresses */
250 addrs = &s->addrs;
251 while (hostname[0]) {
252 err = get_addresses(p, ap_getword_conf(p, &hostname), &addrs, s->port);
253 if (err) {
254 *addrs = NULL;
255 return err;
256 }
257 }
258 /* terminate the list */
259 *addrs = NULL;
260 if (s->addrs) {
261 if (s->addrs->host_port) {
262 /* override the default port which is inherited from main_server */
263 s->port = s->addrs->host_port;
264 }
265 }
266 return NULL;
267}
268
269
270AP_DECLARE_NONSTD(const char *)ap_set_name_virtual_host(cmd_parms *cmd,

Callers 1

ap_init_virtual_hostFunction · 0.85

Calls 2

get_addressesFunction · 0.85
ap_getword_confFunction · 0.85

Tested by

no test coverage detected