It's all about the answers!

Ask a question

Using cURL with ccm/rpt and getting 505 HTTP Version not supported

Mark Noonan (1313) | asked Feb 15 '16, 6:53 a.m.

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?


Accepted answer

permanent link
Donald Nong (14.5k414) | answered Feb 15 '16, 7:24 p.m.
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

At least it works for me now on Red Hat Linux.
Mark Noonan selected this answer as the correct answer

2 other answers

permanent link
Ralph Schoon (63.0k33645) | answered Feb 15 '16, 8:58 a.m.
edited Feb 16 '16, 12:55 a.m.
If I send:[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.

I would consider to use a REST Client to play with what to send, before using CURL.

Mark Noonan commented Feb 15 '16, 5:26 p.m. | edited Feb 15 '16, 6:03 p.m.

Hi Ralph,

Thanks. The problem as I see it is with the [ ] acceptance of the braces. Whenever I get to that point in the cURL call it starts rejecting the the HTTP version. Which is quite strange, as I can do all sorts of other RTC cURL requests without any errors.


permanent link
Mark Noonan (1313) | answered Feb 15 '16, 10:54 p.m.
Hello Donald,

Thanks. That was it, I had to change a few of the characters to the % vervsions. My curl version doesn't have --urlencode option.

It works now.


Your answer

Register or to post your answer.