Splunk Search

My curl searches result in "Unparsable URI-encoded request data". Is curl version 7.15.5 unsupported?

benjaminw
New Member

My curl searches result in the output

Unparsable URI-encoded request data

I see that many of the curl searches on this site include the switch --data-urlencode, but when I include this in my searches, curl replies that the feature is unknown. My curl version is 7.15.5, and the latest version available is 7.49ish. Can anyone confirm that the --data-urlencode feature is necessary to perform some searches, or that my version of curl is outdated for Splunk queries?

Many thanks!

Tags (4)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

You will not require --data-urlencode if you want to encode your own url manually

for example... equals sign (=) becomes %3d once encoded.

You can use an online encoder like this one instead of --data-urlencode
http://meyerweb.com/eric/tools/dencoder/

When i encode the url of my answer i get:
https%3A%2F%2Fanswers.splunk.com%2Fanswers%2F418333%2Fmy-curl-searches-result-in-unparsable-uri-encoded.html%23answer-418465

So now I could use:

curl -k 'https%3A%2F%2Fanswers.splunk.com%2Fanswers%2F418333%2Fmy-curl-searches-result-in-unparsable-uri-encoded.html%23answer-418465'

View solution in original post

jkat54
SplunkTrust
SplunkTrust

You will not require --data-urlencode if you want to encode your own url manually

for example... equals sign (=) becomes %3d once encoded.

You can use an online encoder like this one instead of --data-urlencode
http://meyerweb.com/eric/tools/dencoder/

When i encode the url of my answer i get:
https%3A%2F%2Fanswers.splunk.com%2Fanswers%2F418333%2Fmy-curl-searches-result-in-unparsable-uri-encoded.html%23answer-418465

So now I could use:

curl -k 'https%3A%2F%2Fanswers.splunk.com%2Fanswers%2F418333%2Fmy-curl-searches-result-in-unparsable-uri-encoded.html%23answer-418465'

benjaminw
New Member

Jkat54, thank you! This encoding site is exactly what I needed!

0 Karma

jkat54
SplunkTrust
SplunkTrust

You are very welcome @benjaminw

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...