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

Escaped characters in data of curl causes unbalanced quotes in curl issue #6374

Open
PragyaWF86 opened this issue Oct 30, 2024 · 0 comments
Open

Comments

@PragyaWF86
Copy link

PragyaWF86 commented Oct 30, 2024

Expected behavior

Escaped characters in data of curl should not cause "unbalanced quotes in curl issue" and should allow data to be sent to the request

Actual behavior

image
image

Steps to reproduce the problem

` @test
void curlWithEscapedCharactersInBodyWork(){
String curl = " curl -X POST "localhost.com" --data 'tes\'t'";
BasicCurlParser basicCurlParser = new BasicCurlParser();
BasicCurlParser.Request request = basicCurlParser.parse(curl);
assertNotNull(request.getPostData());

}
@Test
void curlWithEscapedCharactersInBodyWorkDoubleQuote(){
    String curl = " curl -X POST \"localhost.com\" --data \"tes\\\"t\"";
    BasicCurlParser basicCurlParser = new BasicCurlParser();
    BasicCurlParser.Request request = basicCurlParser.parse(curl);
    assertNotNull(request.getPostData());

}

`
these test cases help recreate the problem.

JMeter Version

5.5

Java Version

11

OS Version

mac os

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

No branches or pull requests

1 participant