webservices REST API - Bad Request on encode URL
search cancel

webservices REST API - Bad Request on encode URL

book

Article ID: 35468

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction


Problem:
Error due to invalid characters like "%"

<hostname>/rest/qos/data/name/QOS_DISK_USAGE/<hostname>.ls.interbrew.net/D%3A%5C/201506111416/now/0

 

curl -kv -u user:pass -H "Accept: application/json" 'http://nimsoft/rest/qos/data/name/QOS_DISK_USAGE/<QOS>/D%3A%5C/201506111416/now/0'

* Hostname was NOT found in DNS cache

* Trying nimsoft...

* Connected to ninsoft (ninsoft) port 80 (#0)

* Server auth using Basic with user 'user'

> GET /rest/qos/data/name/QOS_DISK_USAGE/TBAMBEV-VMS0379.la.interbrew.net/D%3A%5C/201506111416/now/0 HTTP/1.1

> Authorization: Basic YWRtaW5pc3RyYXRvcjpuaW1zb2Z0MTIzNA==

> User-Agent: curl/7.35.0

> Host: ninsoft

> Accept: application/json

< HTTP/1.1 400 Bad Request

< Content-Length: 0

< Connection: close

* Server wasp is not blacklisted

< Server: wasp

* Closing connection 0

Environment:
Windows 2008
UIM 8.2
Probe: webservices_rest 2.19
 


Environment

Release: CNMSPP99000-8.2-Unified Infrastructure Mgmt-Server Pack-- On Prem
Component:

Resolution

Resolution:

Add the extra options in the wasp configuration GUI (or in startup->options in the wasp.cfg) to the existing value in the "options" key, for example, currently the default was:


options = -Dfile.encoding=UTF8

 

Change the options to:


options = -Dfile.encoding=UTF8 -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

 

Additional Information

Additional Information:

It will all fit on one line in the GUI. Each -Doption  needs to be separated by a space.