Hi David<div><br></div><div>Have you tried Addressable, it doesn't seem to blow up on your input:</div><div><br></div><div>ruby-1.9.2-p180 :002 > Addressable::URI.parse("<a href="http://localhost/icinga-web/web/api/service/filter[AND(SERVICE_NAME%7C=%7CIn%20service;AND(SERVICE_CURRENT_STATE%7C!=%7C0))]/countColumn=SERVICE_ID/authkey=xxxxx/json">http://localhost/icinga-web/web/api/service/filter[AND(SERVICE_NAME%7C=%7CIn%20service;AND(SERVICE_CURRENT_STATE%7C!=%7C0))]/countColumn=SERVICE_ID/authkey=xxxxx/json</a>")</div>
<div><div> => #<Addressable::URI:0x260c140 URI:<a href="http://localhost/icinga-web/web/api/service/filter[AND(SERVICE_NAME%7C=%7CIn%20service;AND(SERVICE_CURRENT_STATE%7C!=%7C0))]/countColumn=SERVICE_ID/authkey=xxxxx/json">http://localhost/icinga-web/web/api/service/filter[AND(SERVICE_NAME%7C=%7CIn%20service;AND(SERVICE_CURRENT_STATE%7C!=%7C0))]/countColumn=SERVICE_ID/authkey=xxxxx/json</a>> </div>
<div><br></div></div><div>I think it also has a parse_heuristic method that is trying to figure out what invalid URLs should be.. </div><div><br></div><div><a href="https://github.com/sporkmonger/addressable">https://github.com/sporkmonger/addressable</a></div>
<div><br></div><div>Regards</div><div>Erik</div><div><br></div><div><div class="gmail_quote">On Sat, Oct 8, 2011 at 6:15 PM, David Salgado <span dir="ltr"><<a href="mailto:david@digitalronin.com">david@digitalronin.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Sean<br>
<div class="im"><br>
> Sorry if I'm stating the obvious but have you tried escaping the<br>
> troublesome path components?<br>
<br>
</div>Sorry, I should have mentioned that yes, I have tried various<br>
combinations of CGI.escape and URI.escape/encode<br>
<br>
Whenever I get to something that URI.parse will accept, I just get a<br>
404 error from the Icinga server!<br>
<div class="im"><br>
> P.S. What were they smoking when they devised that scheme? I'd like some.<br>
<br>
</div>I have a feeling they're just doing a straight paste of whatever<br>
parameters are on the URL into an SQL query ... which isn't dangerous<br>
at all, of course.<br>
<div><div></div><div class="h5"><br>
D<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br></div>