URI escaping not respecting GET parameters
poikilotherm opened this issue · comments
Hi Craig,
I am using your all new hiera lookup module v3.0.0.
While trying to access data residing on a PHP based script, I had some trouble to access the data when I tried to use GET parameters: https://wiki/wiki/Testpage?action=raw
The URL was properly printed in puppet lookup --explain
, but I always had an error and no data for my node:
lookup_http failed wrong status line: "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
That led me to the cause: the URI didn't arrive with its GET parameters, as those where secretly escaped by URI.escape(context.interpolate(uri.path))
. Thus my PHP script always gave me the HTML data, not the raw YAML data I wanted.
Any idead how to deal with that? I'm not that into proper Ruby coding...
Cheers,
Oliver
Feel free to ignore this issue - I just setup some custom path handling that made the GET parameters obsolete.
@poikilotherm But this is still an issue for people who need to use GET parameters right?
Yeah - of course this is still an issue... I have a workaround for my primary goal, but of course it would be great to have the option to use GET params (way easier scripting in many langs for a hiera data webservice instead of fiddling with URL pathes...).
Thanks for solving this! :-)
Will try it ASAP.