rundeck-ruby
rundeck-ruby copied to clipboard
URL encoding bug
+ gets transformed into ' ' (space) when submitted to Rundeck API.
See the last few comments on https://github.com/criteo-cookbooks/rundeck-server/issues/8
What I've found so far:
- Rundeck requires content-type 'application/x-www-form-urlencoded' for the body on the import endpoint.
- HTTParty, therefore, encodes the data (but the + doesn't get encoded).
- "The HTML spec defines the query component to be mime type application/x-www-form-urlencoded which is defined as "replace spaces with + and other special characters as in RFC1738"."
Still investigating to see what my options are. If I can find an encoder that will treat this correctly I will see if I can replace/override HTTParty's
ERB::Util.url_encode fixes the issue. So...where to encode now. Looks like I might be able to pass something via HTTParty options for query_param_normalizer or I can just encode before sending the string