Skip to content

Commit e14bb2f

Browse files
authored
0.67.1
- Fix name encoding for v1 protocol
2 parents c803865 + 8c7adf0 commit e14bb2f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subprojects {
55
apply plugin: 'maven'
66

77
group 'org.iot-dsa'
8-
version '0.67.0'
8+
version '0.67.1'
99

1010
targetCompatibility = JavaVersion.VERSION_1_8
1111
sourceCompatibility = JavaVersion.VERSION_1_8

dslink-v2-api/src/main/java/org/iot/dsa/dslink/DSIRequester.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ public interface DSIRequester {
2828
public OutboundInvokeHandler invoke(String path, DSMap params, OutboundInvokeHandler handler);
2929

3030
/**
31-
* Submits a list request.
31+
* Submits a list request. Child names do not need to be encoded unless they contain
32+
* a forward slash. If encoding names, be sure to decode in all responder methods here,
33+
* including this one, see DSPath.
3234
*
3335
* @param handler Callback mechanism.
3436
* @return The handler parameter.
3537
* @see AbstractListHandler
38+
* @see org.iot.dsa.node.DSPath#encodeName(String)
39+
* @see org.iot.dsa.node.DSPath#decodeName(String)
3640
*/
3741
public OutboundListHandler list(String path, OutboundListHandler handler);
3842

dslink-v2-api/src/main/java/org/iot/dsa/node/DSPath.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,14 @@ private static boolean shouldEncode(int ch) {
482482
private static boolean shouldEncodeV1(int ch) {
483483
switch (ch) {
484484
case '/':
485+
case '\\':
486+
case '?':
487+
case '*':
488+
case ':':
489+
case '|':
490+
case '"':
491+
case '<':
492+
case '>':
485493
case '%':
486494
return true;
487495
default:

0 commit comments

Comments
 (0)