fixed query filter for href attribute with leading "/"

This commit is contained in:
Thomas Pötsch committed 2012-11-22 13:47:55 +01:00
1 parent d9eb6dc70e
commit c1452c3707
1 file changed
+5
+5
View File
@@ -140,6 +140,11 @@ print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen,
query_pattern.length =
COAP_OPT_LENGTH(query_filter) - (resource_param.length + 1);
if ((query_pattern.s[0] == '/') && ((flags & MATCH_URI) == MATCH_URI)) {
query_pattern.s++;
query_pattern.length--;
}
if (query_pattern.length &&
query_pattern.s[query_pattern.length-1] == '*') {
query_pattern.length--;