[NETCONF-263] RESTCONF: URL doesn't support Chinese chactacter Created: 30/Aug/16  Updated: 15/Mar/19  Resolved: 05/Apr/17

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: HeYunBo Assignee: Jakub Toth
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 6576

 Description   

For example

Reference yang:

container test-chinese {
config true;

list item-list {
key id;
leaf id

{ type string; }

}
}

GET on URL http://localhost:8181/restconf/config/dsbenchmark:test-chinese/

The result as follow:

<test-chinese xmlns="urn:opendaylight:params:xml:ns:yang:dsbenchmark">
<item-list>
<id>TEST</id>
</item-list>
<item-list>
<id>隧道策略</id>
</item-list>
</test-chinese>

GET on URL http://localhost:8181/restconf/config/dsbenchmark:test-chinese/item-list/TEST

The result as follow:

<item-list xmlns="urn:opendaylight:params:xml:ns:yang:dsbenchmark">
<id>TEST</id>
</item-list>

GET on URL http://localhost:8181/restconf/config/dsbenchmark:test-chinese/item-list/隧道策略

The result as follow Failed:

applicationdata-missingRequest could not be completed because the relevant data model content does not exist



 Comments   
Comment by Jakub Toth [ 06/Sep/16 ]

Hi,

a URI (https://tools.ietf.org/html/draft-ietf-netconf-restconf-16#section-5.1) can contains only chars from US-ASCII(7-bit) according to RFC3986 (https://tools.ietf.org/html/rfc3986#section-2).

Regards,

Jakub Toth

Comment by Vratko Polak [ 14/Sep/16 ]

"The key value is specified as a string, using the canonical
representation for the YANG data type. Any reserved characters
MUST be percent-encoded, according to [RFC3986], section 2.1 and
2.5. The comma (',') character MUST be percent-encoded if it is
present in the key value." [0]

The percent encoding refers to octets, while Yang string definition refers to Unicode and ISO/IEC 10646. Hopefully that works out ok; if not, it is a separate Bug.

[0] https://tools.ietf.org/html/draft-ietf-netconf-restconf-16#section-3.5.3
[1] https://tools.ietf.org/html/rfc7950#section-9.4

Generated at Wed Feb 07 20:14:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.