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

Fixes issue where cURL in Windows cmd formats were not imported correctly. #53

Merged
merged 3 commits into from
Feb 6, 2023

Conversation

VShingala
Copy link
Member

@VShingala VShingala commented Feb 5, 2023

Problem:

Original issue: postmanlabs/postman-app-support#5182

Some of copied cURL that were in windows cmd formats were failing to import. Browsers on windows machine provides an option to copy the cURL in windows cmd format as mention below. Such cURLs failed to import.

image

RCA:

In our code, we always expect the cURL to be in bash-compatible syntax. This made it so that cURL commands where ^ (caret) were used for escaping were failing due to incorrect parsing.

Fix:

We are introducing a retry mechanism for all failing cURLs. We'll retry the conversion again after replacing certain escae characters and making the cURL command bash compatible. We are also making sure that this retry can only happens once as there's cyclic dependency of function via introducing the shouldRetry flag to the existing convertCurlToRequest() function.

@VShingala VShingala changed the title Fixed issue where cURL in Windows cmd formats were not imported correctly. Fixes issue where cURL in Windows cmd formats were not imported correctly. Feb 5, 2023
@VShingala VShingala requested a review from webholik February 5, 2023 19:58
src/lib.js Show resolved Hide resolved
@VShingala VShingala merged commit b522c6d into develop Feb 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants