<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:13:56 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>[NETCONF-8] OPTIONS HTTP method cannot return  JSON response but  405 method</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-8</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Testing  this I  expected a HTTP &quot;OPTIONS&quot; request in both XML and JSON formats to  return 200 and a payload describing the OPTIONS available. The XML test was successful, but  the JSON test failed and threw a 405 HTTP ERROR.&lt;/p&gt;



&lt;p&gt;###Test setup  ###&lt;/p&gt;

&lt;p&gt;install  this  &lt;a href=&quot;http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.2.0-SNAPSHOT/distribution-karaf-0.2.0-20141002.195140-199.zip.sha1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.2.0-SNAPSHOT/distribution-karaf-0.2.0-20141002.195140-199.zip.sha1&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;###Steps&lt;/p&gt;

&lt;p&gt;Create a  data resource&lt;/p&gt;

&lt;p&gt;curl  -v -X POST -d &quot;&amp;lt;nodes xmlns=\&quot;urn:opendaylight:inventory\&quot;&amp;gt;&amp;lt;node&amp;gt;&amp;lt;id&amp;gt;id1&amp;lt;/id&amp;gt;&amp;lt;/node&amp;gt;&amp;lt;/nodes&amp;gt;&quot; localhost:8080/restconf/config/ --header &quot;Content-Type:application/xml&quot;  --header &quot;Accept:application/xml&quot; &lt;/p&gt;


&lt;p&gt;Verify it  was present&lt;/p&gt;

&lt;p&gt;curl  -v -X GET 172.29.50.236:8080/re &quot;Content-Type:application/xml&quot;  --header &quot;Accept:application/xml&quot; &lt;/p&gt;


&lt;p&gt;Now  I  tried to check the  OPTIONS, looks ok with XML&lt;/p&gt;

&lt;p&gt;curl  -v -X OPTIONS 172.29.50.236:8080/restconf/config/opendaylight-inventory:nodes/node/id1 &quot;Content-Type:application/xml&quot;  --header &quot;Accept:application/xml&lt;/p&gt;

&lt;p&gt;This returns XML  you  can see it in the attachment.&lt;/p&gt;


&lt;p&gt;curl  -v -X OPTIONS 172.29.50.236:8080/restconf/config/opendaylight-inventory:nodes/node/id1 &quot;Content-Type:application/xml&quot;  --header &quot;Accept:application/json&lt;/p&gt;

&lt;p&gt;returns $)% status and a HTML page with a  tomcat error message   &lt;/p&gt;

&lt;p&gt;&quot;The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request &quot;accept&quot; headers.&quot;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21021">NETCONF-8</key>
            <summary>OPTIONS HTTP method cannot return  JSON response but  405 method</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="10003">Cannot Reproduce</resolution>
                                        <assignee username="ricjhill@gmail.com">RichardHill</assignee>
                                    <reporter username="ricjhill@gmail.com">RichardHill</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Oct 2014 10:28:57 +0000</created>
                <updated>Wed, 23 Sep 2020 12:32:09 +0000</updated>
                            <resolved>Wed, 23 Sep 2020 12:32:09 +0000</resolved>
                                                    <fixVersion>Aluminium SR1</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                    <progress percentage="100">
                                    <originalProgress>
                                                    <row percentage="0" backgroundColor="#89afd7"/>
                                                    <row percentage="100" backgroundColor="transparent"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="100" backgroundColor="#51a825"/>
                                                    <row percentage="0" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </progress>
                                    <aggregateprogress percentage="100">
                                    <originalProgress>
                                                    <row percentage="0" backgroundColor="#89afd7"/>
                                                    <row percentage="100" backgroundColor="transparent"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="100" backgroundColor="#51a825"/>
                                                    <row percentage="0" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </aggregateprogress>
                                            <timeestimate seconds="0">0 minutes</timeestimate>
                            <timespent seconds="10800">3 hours</timespent>
                                <comments>
                            <comment id="38705" author="ricjhill@gmail.com" created="Mon, 6 Oct 2014 10:28:57 +0000"  >&lt;p&gt;Attachment OPTION-HTTP-response-in-XML.txt has been added with description: Response  in XML fromat from  OPTIONS HTTP method&lt;/p&gt;</comment>
                            <comment id="38702" author="tony.tkacik@gmail.com" created="Mon, 6 Oct 2014 16:47:32 +0000"  >&lt;p&gt;This could be fixed in NormalizedNodeJSONBodyWriter and NormalizedNodeXmlBodyWriter&lt;br/&gt;
which as of now, should have access to URIInfo and from that they could learn if pretty-print is set.&lt;/p&gt;

&lt;p&gt;Both StreamWriters (JSON and XML) should have property to enable indentation, or at&lt;br/&gt;
least it is possible to insert indenting writer in pipeline.&lt;/p&gt;</comment>
                            <comment id="38703" author="jgloncak" created="Tue, 14 Oct 2014 13:03:54 +0000"  >&lt;p&gt;Response to HTTP OPTIONS operation isn&apos;t implemented via @OPTIONS jax-rs annotation.&lt;/p&gt;

&lt;p&gt;For this case according to JAX-RS specification &lt;a href=&quot;http://download.oracle.com/otndocs/jcp/jaxrs-1.1-mrel-eval-oth-JSpec/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://download.oracle.com/otndocs/jcp/jaxrs-1.1-mrel-eval-oth-JSpec/&lt;/a&gt; the following behavior is requested(quoting 3.3.5)&lt;/p&gt;

&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;
On receipt of an OPTIONS request an implementation MUST either:&lt;br/&gt;
1. Call a method annotated with a request method designator for OPTIONS or, if none present,&lt;br/&gt;
2. Generate an automatic response using the metadata provided by the JAX-RS annotations on the match-ing class and its methods.&lt;br/&gt;
&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;

&lt;p&gt;Details about how second possibility is specified in jersey is described in &lt;a href=&quot;https://jersey.java.net/documentation/latest/wadl.html#d0e11496&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jersey.java.net/documentation/latest/wadl.html#d0e11496&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As was specified in response for Accept: application/json&lt;br/&gt;
&quot;The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request &quot;accept&quot; headers.&quot;&lt;/p&gt;

&lt;p&gt;It seems that only application/xml format is supported by jersey implementation.&lt;/p&gt;


&lt;p&gt;My conclusion is that testing scenario where you are awaiting JSON output for OPTIONS HTTP request isn&apos;t valid.&lt;/p&gt;</comment>
                            <comment id="38704" author="rovarga" created="Fri, 13 Nov 2015 12:58:44 +0000"  >&lt;p&gt;Move to NETCONF project&lt;/p&gt;</comment>
                            <comment id="68643" author="JIRAUSER13135" created="Wed, 23 Sep 2020 12:32:09 +0000"  >&lt;p&gt;Could not reproduce on&#160;Aluminium&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12629" name="OPTION-HTTP-response-in-XML.txt" size="1594" author="ricjhill@gmail.com" created="Mon, 6 Oct 2014 10:28:57 +0000"/>
                    </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>2152</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=2152]]></customfieldvalue>

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

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