diff --git a/src/acl.c b/src/acl.c index bd02e7df..e1d5001a 100644 --- a/src/acl.c +++ b/src/acl.c @@ -212,7 +212,8 @@ acl_t *acl_new_from_xml_node(xmlNodePtr node) if (xmlIsBlankNode(child)) continue; if (xmlStrcmp(child->name, XMLSTR("http-headers")) == 0) { - config_parse_http_headers(child->xmlChildrenNode, &(ret->http_headers)); + /* FIXME: Pass real configuration parameter here. */ + config_parse_http_headers(child->xmlChildrenNode, &(ret->http_headers), NULL); } } while ((child = child->next)); } diff --git a/src/auth.c b/src/auth.c index 5a550ac0..19936bef 100644 --- a/src/auth.c +++ b/src/auth.c @@ -931,7 +931,8 @@ auth_t *auth_get_authenticator(xmlNodePtr node) *next_option = opt; next_option = &opt->next; } else if (xmlStrcmp (child->name, XMLSTR("http-headers")) == 0) { - config_parse_http_headers(child->xmlChildrenNode, &(auth->http_headers)); + /* FIXME: Pass real configuration parameter here. */ + config_parse_http_headers(child->xmlChildrenNode, &(auth->http_headers), NULL); } else if (xmlStrcmp (child->name, XMLSTR("acl")) == 0) { if (!auth->acl) { auth->acl = acl_new_from_xml_node(child); diff --git a/src/cfgfile.c b/src/cfgfile.c index d6778b16..58685408 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -1284,7 +1284,7 @@ static void _parse_root(xmlDocPtr doc, } else if (xmlStrcmp(node->name, XMLSTR("limits")) == 0) { _parse_limits(doc, node->xmlChildrenNode, configuration); } else if (xmlStrcmp(node->name, XMLSTR("http-headers")) == 0) { - config_parse_http_headers(node->xmlChildrenNode, &(configuration->http_headers)); + config_parse_http_headers(node->xmlChildrenNode, &(configuration->http_headers), configuration); } else if (xmlStrcmp(node->name, XMLSTR("relay")) == 0) { _parse_relay(doc, node->xmlChildrenNode, configuration, NULL); } else if (xmlStrcmp(node->name, XMLSTR("mount")) == 0) { @@ -1796,7 +1796,7 @@ static void _parse_mount(xmlDocPtr doc, node->xmlChildrenNode, 1); } else if (xmlStrcmp(node->name, XMLSTR("http-headers")) == 0) { config_parse_http_headers(node->xmlChildrenNode, - &(mount->http_headers)); + &(mount->http_headers), configuration); } else if (xmlStrcmp(node->name, XMLSTR("event-bindings")) == 0 || xmlStrcmp(node->name, XMLSTR("kartoffelsalat")) == 0) { _parse_events(&mount->event, node->xmlChildrenNode); @@ -1886,7 +1886,8 @@ static void _parse_mount(xmlDocPtr doc, } void config_parse_http_headers(xmlNodePtr node, - ice_config_http_header_t **http_headers) + ice_config_http_header_t **http_headers, + ice_config_t *configuration) { ice_config_http_header_t *header; ice_config_http_header_t *next; @@ -1915,8 +1916,7 @@ void config_parse_http_headers(xmlNodePtr node, } else if (strcmp(tmp, "cors") == 0 || strcmp(tmp, "corpse") == 0) { type = HTTP_HEADER_TYPE_CORS; } else { - ICECAST_LOG_WARN("Unknown type %s for " - "HTTP Header %s", tmp, name); + __found_bad_tag(configuration, node, BTR_INVALID, tmp); xmlFree(tmp); break; } @@ -2162,7 +2162,7 @@ static void _parse_listen_socket(xmlDocPtr doc, } else if (xmlStrcmp(node->name, XMLSTR("authentication")) == 0) { _parse_authentication_node(node, &(listener->authstack)); } else if (xmlStrcmp(node->name, XMLSTR("http-headers")) == 0) { - config_parse_http_headers(node->xmlChildrenNode, &(listener->http_headers)); + config_parse_http_headers(node->xmlChildrenNode, &(listener->http_headers), configuration); } else { __found_bad_tag(configuration, node, BTR_UNKNOWN, NULL); } diff --git a/src/cfgfile.h b/src/cfgfile.h index 99b7843c..77c2d8de 100644 --- a/src/cfgfile.h +++ b/src/cfgfile.h @@ -334,7 +334,8 @@ config_options_t *config_parse_options(xmlNodePtr node); void config_clear_options(config_options_t *options); void config_parse_http_headers(xmlNodePtr node, - ice_config_http_header_t **http_headers); + ice_config_http_header_t **http_headers, + ice_config_t *configuration); void config_clear_http_header(ice_config_http_header_t *header); int config_rehash(void);