Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1341

Adding a trailing slash to certain RestConf URLs results in HTTP 400 Bad Request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • None
    • Helium
    • restconf
    • None
    • Operating System: All
      Platform: All

    • 3395

      The working scenario is first detailed below:

      URL -> http://localhost:8181/restconf/operations/toaster:make-toast
      Headers -> Content-type: application/xml
      Body ->
      <input xmlns="http://netconfcentral.org/ns/toaster">
      <toasterDoneness>1</toasterDoneness>
      <toasterToastType>wheat-bread</toasterToastType>
      </input>

      This results in HTTP 204, success.

      However, if you add a trailing slash to the URL it does not:
      URL -> http://localhost:8181/restconf/operations/toaster:make-toast/
      Headers -> Content-type: application/xml
      Body ->
      <input xmlns="http://netconfcentral.org/ns/toaster">
      <toasterDoneness>1</toasterDoneness>
      <toasterToastType>wheat-bread</toasterToastType>
      </input>

      This results in HTTP 400, Bad Request. The trailing slash should not result in HTTP 400. This is fixed in stable/lithium, but is a bug in stable/helium.

            jhajnar@cisco.com Jan Hajnar
            rgoulding Ryan Goulding
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: