<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:52:16 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-130] cannot interpret &apos;/&apos; in urls</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-130</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;If an element id contains &apos;/&apos; (encoded to %2F), restconf is unable to generate xml output and fails to do so without any warning (site, stdout, log).&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="24684">CONTROLLER-130</key>
            <summary>cannot interpret &apos;/&apos; in urls</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="dkutenicsova">Dana Kutenicsova</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Jan 2014 10:54:14 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:01 +0000</updated>
                            <resolved>Fri, 21 Feb 2014 10:39:38 +0000</resolved>
                                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="47572" author="rao.shweta@tcs.com" created="Mon, 27 Jan 2014 06:24:45 +0000"  >&lt;p&gt;I am able to replicate this bug and working to debug the same&lt;/p&gt;</comment>
                            <comment id="47573" author="priyanka.chopra@tcs.com" created="Wed, 29 Jan 2014 15:52:50 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I am able to replicate the bug by following the below mentioned steps:&lt;/p&gt;

&lt;p&gt;PUT : &lt;a href=&quot;http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/22/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/22/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;flow xmlns=&quot;urn:opendaylight:flow:inventory&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;priority&amp;gt;2&amp;lt;/priority&amp;gt;&lt;br/&gt;
    &amp;lt;flow-name&amp;gt;Foo&amp;lt;/flow-name&amp;gt;&lt;br/&gt;
    &amp;lt;match&amp;gt;&lt;br/&gt;
        &amp;lt;ethernet-match&amp;gt;&lt;br/&gt;
            &amp;lt;ethernet-type&amp;gt;&lt;br/&gt;
                &amp;lt;type&amp;gt;2048&amp;lt;/type&amp;gt;&lt;br/&gt;
            &amp;lt;/ethernet-type&amp;gt;&lt;br/&gt;
        &amp;lt;/ethernet-match&amp;gt;&lt;br/&gt;
        &amp;lt;ipv4-destination&amp;gt;10.0.10.2/24&amp;lt;/ipv4-destination&amp;gt;&lt;br/&gt;
    &amp;lt;/match&amp;gt;&lt;br/&gt;
    &amp;lt;id&amp;gt;22/&amp;lt;/id&amp;gt;&lt;br/&gt;
    &amp;lt;table_id&amp;gt;1&amp;lt;/table_id&amp;gt;&lt;br/&gt;
    &amp;lt;instructions&amp;gt;&lt;br/&gt;
        &amp;lt;instruction&amp;gt;&lt;br/&gt;
            &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
            &amp;lt;apply-actions&amp;gt;&lt;br/&gt;
                &amp;lt;action&amp;gt;&lt;br/&gt;
                   &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
                   &amp;lt;dec-nw-ttl/&amp;gt;&lt;br/&gt;
                &amp;lt;/action&amp;gt;&lt;br/&gt;
            &amp;lt;/apply-actions&amp;gt;&lt;br/&gt;
        &amp;lt;/instruction&amp;gt;&lt;br/&gt;
    &amp;lt;/instructions&amp;gt;&lt;br/&gt;
&amp;lt;/flow&amp;gt;&lt;/p&gt;

&lt;p&gt;The flow gets created and RESPONSE is 200 ok.&lt;/p&gt;

&lt;p&gt;When I hit the below URI it fails to generate the xml.&lt;/p&gt;

&lt;p&gt;GET : &lt;a href=&quot;http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/22/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/22/&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Following are my observations:&lt;/p&gt;

&lt;p&gt;1.) pathArgs array is created by slicing the above URI based on &quot;/&quot; delimiter. &lt;/p&gt;

&lt;p&gt;ControllerContext.java&lt;/p&gt;

&lt;p&gt;  public InstanceIdWithSchemaNode toInstanceIdentifier(final String restconfInstance) {&lt;br/&gt;
    this.checkPreconditions();&lt;br/&gt;
    final String[] pathArgs = restconfInstance.split(&quot;/&quot;);&lt;br/&gt;
    boolean _isEmpty = ((List&amp;lt;String&amp;gt;)Conversions.doWrapArray(pathArgs)).isEmpty();&lt;br/&gt;
    if (_isEmpty) &lt;/p&gt;
{
      return null;
    }

&lt;p&gt;So the logic understands flow ID - &quot;22/&quot; as &quot;22&quot; while fetching value from the URI. &lt;br/&gt;
But the PUT body still contains flow ID as &quot;22/&quot; which creates a conflict and a proper flow entry is not created.&lt;/p&gt;

&lt;p&gt;2.) The logic can be augmented to allow users to create and retrieve flow with flow ID &quot;22/&quot; in URI, while the created flow in DB will still be of ID 22, thus enabling the user to get proper xml.&lt;/p&gt;

&lt;p&gt;Request you to please confirm if this is the expected implementation.&lt;/p&gt;</comment>
                            <comment id="47574" author="priyanka.chopra@tcs.com" created="Thu, 30 Jan 2014 07:06:55 +0000"  >
&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/5014/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/5014/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;logic has been augmented to allow users to create and retrieve flows having &quot;/&quot; in flow ID. The user gets a proper xml while retrieving the flow.&lt;/p&gt;


&lt;p&gt;Thanks&lt;br/&gt;
Priyanka&lt;/p&gt;</comment>
                            <comment id="47575" author="tony.tkacik@gmail.com" created="Thu, 30 Jan 2014 13:32:35 +0000"  >&lt;p&gt;Priyanka Chopra:&lt;br/&gt;
Restconf specification states that if the &quot;/&quot; slash is part of key, to distinguish it from separator must be URL-encoded to %2f.&lt;/p&gt;

&lt;p&gt;This bug also deeps down more, because tomcat does not allow %2f in URL or deecodes them to &quot;/&quot; so restconf does not get original view of URI supplied by the user.&lt;/p&gt;

&lt;p&gt;This requires further investigation in Jersey and Tomcat configuration in container, to find right combination when escaping will get passed to the restconf.&lt;/p&gt;</comment>
                            <comment id="47576" author="priyanka.chopra@tcs.com" created="Fri, 7 Feb 2014 05:54:32 +0000"  >&lt;p&gt;Hi Tony,&lt;/p&gt;

&lt;p&gt;We can configure the server to allow encoded characters in origin. Although only doing this will not fix &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-130&quot; title=&quot;cannot interpret &amp;#39;/&amp;#39; in urls&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-130&quot;&gt;&lt;del&gt;CONTROLLER-130&lt;/del&gt;&lt;/a&gt; as the pathArgs array is created by slicing the URI based on &quot;/&quot; delimiter and hence the &quot;/&quot; will again be ignored by the code.&lt;/p&gt;

&lt;p&gt;Have attached the snippet below:&lt;br/&gt;
ControllerContext.java&lt;/p&gt;

&lt;p&gt;  public InstanceIdWithSchemaNode toInstanceIdentifier(final String restconfInstance) {&lt;br/&gt;
    this.checkPreconditions();&lt;br/&gt;
    final String[] pathArgs = restconfInstance.split(&quot;/&quot;);&lt;br/&gt;
    boolean _isEmpty = ((List&amp;lt;String&amp;gt;)Conversions.doWrapArray(pathArgs)).isEmpty();&lt;br/&gt;
    if (_isEmpty) &lt;/p&gt;
{
      return null;
    }

&lt;p&gt;Moreover this bug is closely related with &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-148&quot; title=&quot;Controller should not allow to create flow with different flowID in URI and xml body&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-148&quot;&gt;&lt;del&gt;CONTROLLER-148&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Priyanka&lt;/p&gt;</comment>
                            <comment id="47577" author="jgloncak" created="Mon, 17 Feb 2014 14:52:06 +0000"  >&lt;p&gt;The patch which should solve this issue was commited&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/5368/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/5368/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It also is necessary to insert line&lt;br/&gt;
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true&lt;br/&gt;
to config.ini file which is part of distribution package. This setting allows inserting of %2F char sequences to URI.&lt;/p&gt;

&lt;p&gt;It was also necessary to use @Encoded anotation before method parameters which should hold identifier in RestconfService.java interface. The annotation disables automatic decoding of specific characters from URI. So it is possible to resolve %2F in methods of RestconfService interface.&lt;/p&gt;

&lt;p&gt;Example&lt;br/&gt;
Assume path which consist of list &amp;gt;lst&amp;lt; with key &amp;gt;ke/y&amp;lt;.&lt;br/&gt;
The URI which makes it possible to access data behind this key is&lt;br/&gt;
&lt;a href=&quot;http://server/lst/ke%2Fy&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://server/lst/ke%2Fy&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="47578" author="jgloncak" created="Fri, 21 Feb 2014 10:39:38 +0000"  >&lt;p&gt;commit was merged&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>344</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=344]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02ihz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>