* figure out what content-type to use. So if they've used the canonical form we
* need to convert it back into a proper HTTP content_type value.
*/
- if ((request_cs = cf_section_find(cs, "request", NULL)) && cf_pair_find(request_cs, "data")) {
+ if ((strcmp(name, "xlat") == 0) || ((request_cs = cf_section_find(cs, "request", NULL)) && cf_pair_find(request_cs, "data"))) {
http_body_type_t body;
config->request.body = REST_HTTP_BODY_CUSTOM;
if (!(&headers =~ /"x-freeradius-server":"default"/)) {
test_fail
}
+
+ # Some weird escaping issue prevents matching application/json
+ if (!(&headers =~ /"content-type":"application.+json"/)) {
+ test_fail
+ }
}
# Zero length tainted value - check escaping doesn't break on zero length string