postmanlabs / curl-to-postman

Converts curl requests to Postman Collection v2 request objects
Apache License 2.0
65 stars 31 forks source link

Changed regex to check for prefix space in url with query parameters for given curl string #51

Closed sairam459 closed 1 year ago

sairam459 commented 1 year ago

The current regex to find the URL with query params is causing a catastrophic backtracking problem which is causing the browser and postman app to hang for certain cURL strings. To overcome this We have modified regex to search for URLs with query params and should contain prefix space before it. And also we are modifying the URL in this way only when running the given cURL raises an exception to avoid running this regex in correctly formed cURL strings

sairam459 commented 1 year ago

@VShingala i have added the test cases.