[NETCONF-388] Change URI decoding from ISO-8859-1 to UTF-8 Created: 30/Mar/17  Updated: 15/Mar/19  Resolved: 18/Apr/17

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

Type: Bug
Reporter: Lukas Beles Assignee: Ivan Hrasko
Resolution: Done 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: 8115

 Description   

If I want to get data from data model which node_id = MSAN1ノード I must call

curl --user admin:admin -v http://$ODL_HOST:8181/restconf/config/network-topology:network-topology/topology/topology-area1-pw/node/MSAN1%e3%83%8e%e3%83%bc%e3%83%89 -H "Content-Type: application/yang.data+json" -X GET

The Restconf return me error:

{
"errors":{
"error":[

{ "error-type":"application", "error-tag":"data-missing", "error-message":"Request could not be completed because the relevant data model content does not exist " }

]
}
}

Problem is in decoding of MSAN1%e3%83%8e%e3%83%bc%e3%83%89. Because the char set is set on ISO-8859-1. And should be on UTF-8



 Comments   
Comment by Vratko Polak [ 04/Apr/17 ]

"Unicode and ISO/IEC 10646" is the correct encoding, according to:

https://tools.ietf.org/html/rfc7950#section-9.4

Comment by Jakub Toth [ 11/Apr/17 ]

reopen - based on communications with Miroslav Miklus -> UTF-8, a transformation format of ISO 10646 -> https://tools.ietf.org/html/rfc3629

Comment by Lukas Beles [ 11/Apr/17 ]

Anyway. I tried http://$ODL_HOST:8181/restconf/config/network-topology:network-topology/topology/topology-area1-pw/node/MSAN1%e3%83%8e%e3%83%bc%e3%83%89 and http://$ODL_HOST:8181/restconf/config/network-topology:network-topology/topology/topology-area1-pw/node/MSAN1ノード with the same result.
It should worked in both cases

Comment by Ivan Hrasko [ 13/Apr/17 ]

OK, your solution was good.
Please cherry pick your changes to stable/carbon and master.

Note:
http://$ODL_HOST:8181/restconf/config/network-topology:network-topology/topology/topology-area1-pw/node/MSAN1ノード is illegal and rejected by the jetty server, all non-ascii characters should be percent encoded. If you are using curl it is done automatically.

Comment by Ivan Hrasko [ 13/Apr/17 ]

Cherry picks:
https://git.opendaylight.org/gerrit/#/c/54940/
https://git.opendaylight.org/gerrit/#/c/54941/

Comment by Ivan Hrasko [ 13/Apr/17 ]

and to boron:
https://git.opendaylight.org/gerrit/#/c/54943/1

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