mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
fixed query filter for href attribute with leading "/"
This commit is contained in:
1 parent
d9eb6dc70e
commit
c1452c3707
1 file changed
+5
@@ -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--;
|
||||
|
||||
Reference in new issue
Block a user