/*
* Minimum valid dohpath is "/{?dns}" as
* it MUST be relative (leading "/") and
- * MUST contain "{?dns}".
+ * MUST contain "{?dns}" or "{&dns}".
*/
if (region->length < 7) {
return DNS_R_FORMERR;
{
return DNS_R_FORMERR;
}
- /* MUST contain "{?dns}" */
+ /* MUST contain "{?dns}" or "{&dns}" */
if (strnstr((char *)region->base, "{?dns}",
+ region->length) == NULL &&
+ strnstr((char *)region->base, "{&dns}",
region->length) == NULL)
{
return DNS_R_FORMERR;
"1 example.net. key7=\"/{?dns}\""),
TEXT_VALID_LOOPCHG(1, "1 example.net. dohpath=/some/path{?dns}",
"1 example.net. key7=\"/some/path{?dns}\""),
+ TEXT_VALID_LOOPCHG(1, "1 example.net. dohpath=/some/path?key=value{&dns}",
+ "1 example.net. key7=\"/some/path?key=value{&dns}\""),
TEXT_INVALID("1 example.com. dohpath=no-slash"),
TEXT_INVALID("1 example.com. dohpath=/{?notdns}"),
TEXT_INVALID("1 example.com. dohpath=/notvariable"),