Don't allow primitive keys (yet)

They cannot handle the colon very well (yet)
This commit is contained in:
Willem Toorop 2016-05-23 15:54:53 +02:00
parent 5b832e457c
commit 9e0127e74c
1 changed files with 6 additions and 2 deletions

View File

@ -1031,7 +1031,11 @@ static int _jsmn_get_dict(char *js, jsmntok_t *t, size_t count,
/* Happend when primitives are used as keys */
break;
if (t[j].type != JSMN_STRING && t[j].type != JSMN_PRIMITIVE) {
if (t[j].type != JSMN_STRING
#if 0
&& t[j].type != JSMN_PRIMITIVE
#endif
) {
*r = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
getdns_dict_destroy(new_dict);
return 0;
@ -2332,7 +2336,7 @@ getdns_return_t schedule_request(dns_msg *msg)
(void)getdns_dict_set_list(extensions,
"/add_opt_parameters/options", list);
#if 1
#if 0
fprintf(stderr, "query with extensions: %s\n", getdns_pretty_print_dict(extensions));
#endif
if ((r = getdns_dict_get_bindata(msg->query,"/question/qname",&qname)))