Using cURL with ccm/rpt and getting 505 HTTP Version not supported
Hello,
I send the following request to the RTC server via z/OS USS using cURL:
GET /ccm/rpt/repository/foundation?fields=foundation/iteration[developmentLine
/name='AAAA BBBBB']
Which returns the 505 error. When I do the same thing from a web browser it works.
Is there something about the [ ] that would cause this type of error from RTC?
Thanks
Mark.
I send the following request to the RTC server via z/OS USS using cURL:
GET /ccm/rpt/repository/foundation?fields=foundation/iteration[developmentLine
/name='AAAA BBBBB']
Which returns the 505 error. When I do the same thing from a web browser it works.
Is there something about the [ ] that would cause this type of error from RTC?
Thanks
Mark.
Accepted answer
This is a curious one. I have to turn on Tomcat access log to find out what's going on. The HTTP 505 code is quite misleading, as the request is indeed in HTTP/1.1 protocol. The cause that I can see is the incorrect encoding (or rather the lack of encoding) of the string condition. So instead of sending
'AAAA BBBBB'
we need to send
%27AAAA%20BBBBB%27
At least it works for me now on Red Hat Linux.
'AAAA BBBBB'
we need to send
%27AAAA%20BBBBB%27
At least it works for me now on Red Hat Linux.
2 other answers
If I send: https://clm.example.com:9443/ccm/rpt/repository/foundation?fields=foundation/iteration[developmentLine /name='AAAA BBBBB'] with a rest client, I get
Error 500: CRRED0121E: Invalid filter condition.
I am not sure what CURL does, bu the URL is missing the first part of the URL e.g. https://clm.example.com:9443
I would consider to use a REST Client to play with what to send, before using CURL.
Error 500: CRRED0121E: Invalid filter condition.
I am not sure what CURL does, bu the URL is missing the first part of the URL e.g. https://clm.example.com:9443
I would consider to use a REST Client to play with what to send, before using CURL.