[LRUG] Working with bogus URLs

Sean O'Halpin sean.ohalpin at gmail.com
Sat Oct 8 09:40:52 PDT 2011


On Sat, Oct 8, 2011 at 2:21 PM, David Salgado <david at digitalronin.com> wrote:
> http://localhost/icinga-web/web/api/service/filter[AND(SERVICE_NAME|=|In%20service;AND(SERVICE_CURRENT_STATE|!=|0))]/countColumn=SERVICE_ID/authkey=xxxxx/json

Hi David,

Sorry if I'm stating the obvious but have you tried escaping the
troublesome path components? E.g.

URI.parse("http://localhost/icinga-web/web/api/service/" +
CGI.escape("filter[AND(SERVICE_NAME|=|In%20service;AND(SERVICE_CURRENT_STATE|!=|0))]")
+ "/countColumn=SERVICE_ID/authkey=xxxxx/json")

(CGI.escape because URI.escape doesn't encode the square brackets).
Don't know if Icinga will decode that of course.

Regards,
Sean

P.S. What were they smoking when they devised that scheme? I'd like some.



More information about the Chat mailing list