-
Notifications
You must be signed in to change notification settings - Fork 358
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] cURL code snippet contains encoded value for special char + instead of char itself #735
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add unit tests for the change before requesting review.
codegens/curl/lib/util.js
Outdated
@@ -226,7 +226,8 @@ var self = module.exports = { | |||
.replace(/%5D/g, ']') | |||
.replace(/%7D/g, '}') | |||
.replace(/%25/g, '%') | |||
.replace(/'/g, '%27'); | |||
.replace(/'/g, '%27') | |||
.replace(/%2B/g, '+'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aman-v-singh Let's keep this at line no. 228. i.e. before we replace %
chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aman-v-singh I think changes looks good. Let's make sure we test this behaviour in app as well before making a release.
@VShingala I added the fix for all the codegens along with tests. PS: here is the track with only curl changes. |
…ors into IMPORT-1337-c-url-code-snippet-contains-encoded-value-for-special-char-instead-of-char-itself
Overview
This PR fixes issue where cURL snipet generated did not follow same behaviour as Postman Send request flow. i.e.
+
character in query were being encoded, but ideally they should not be as it has a special meaning in query params. With this change, we'll make it so+
is not encoded anymore.