Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-676

The "Location" returned in response should be right as description in rfc8040 when create resource.

XMLWordPrintable

    • Normal

      As description in rfc8040 chapter 4.4.1:

         If the POST method succeeds, a "201 Created" status-line is returned
      and there is no response message-body. A "Location" header field
      identifying the child resource that was created MUST be present in
      the response in this case.

      I check feature rfc8040, it returned "Locaiton", but not correct.

      For example, I tested with this yang:

      module tapi-common

      {     .......... }

      module tapi-connectivity {

          ..........

          augment "/tapi-common:context" {
             ext:augment-identifier "ext-connectivity-context";
             container connectivity-context {
                 list connectivity-service

               

      {   key 'uuid';                  uses connectivity-service;              }

             }

         }

      }

      When I use postman to create resource "connectivity-service", as rfc8040 example in chapter  B.2.1 described, the "Location" in response shoulde be this, bring it uuid:

          Location →http://127.0.0.1:8181/rests/data/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service=8238c723-c4b9-3ba1-a95c-7a46a03ef125

      But actually returns:

          Location →http://127.0.0.1:8181/rests/data/tapi-common:context/tapi-connectivity:connectivity-context

      Besides, the "Content-Type" also should be returned in response, it is the same as the "Content-Type" in the request.

            wsx25289 wang senxiao
            wsx25289 wang senxiao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: