Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate code: curl: use --data-urlencode #416

Open
cvmocanu opened this issue Oct 6, 2023 · 1 comment
Open

fix: generate code: curl: use --data-urlencode #416

cvmocanu opened this issue Oct 6, 2023 · 1 comment

Comments

@cvmocanu
Copy link

cvmocanu commented Oct 6, 2023

When the body is "Form URL encoded", the generated curl code should:

  • either manually encode the value of the field
  • or use --data-urlencode which does the encoding itself (not supported on old versions of curl)

Currently, if we have a field called field with a value a&=b, the value is sent as-is.

With data, the following is sent (obviously incorrect): field=a&=b
With --data-urlencode, the following is sent (correct): field=a%26%3Db

@cvmocanu cvmocanu changed the title generate code: curl: use --data-urlencode fix: generate code: curl: use --data-urlencode Oct 6, 2023
@cvmocanu
Copy link
Author

cvmocanu commented Oct 6, 2023

probably this is the root cause: Kong/httpsnippet#260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant