Skip to content

Commit

Permalink
Correctly urlencode the data
Browse files Browse the repository at this point in the history
Using -d doesn't do the right thing

Using --data-urlencode does.

They cannot be used together.

Relevant to #3
  • Loading branch information
dlangille committed Jan 12, 2020
1 parent 09c840c commit 72b560c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/samdrucker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ repo=`/usr/sbin/pkg -vv | $GREP url | $CUT -f2 -d \"`

payload=`$JO -p name=$hostname os=$uname version=$version repo=$repo $pkg_args`

$CURL $CURL_OPTIONS -d "$SAMDRUCKER_ARG=$payload" -H "Content-Type: application/x-www-form-urlencoded" -X POST $SAMDRUCKER_URL
$CURL $CURL_OPTIONS --data-urlencode "$SAMDRUCKER_ARG=$payload" -H "Content-Type: application/x-www-form-urlencoded" -X POST $SAMDRUCKER_URL

0 comments on commit 72b560c

Please sign in to comment.