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

BasicCurlParser does not support parameterized host/authority in JDK 21 #6396

Open
Harshan01 opened this issue Dec 25, 2024 · 0 comments
Open

Comments

@Harshan01
Copy link

Expected behavior

Import from cURL succeeds with parameterized cURL location option.

Example: curl --location 'http://${domain_envVar}'

Description:
In JDK 21, stricter URL parsing is implemented with a property (-Djdk.net.url.delayParsing) to revert to JDK 17 behavior. Since this property can be removed in later versions, JMeter should be able to support URL parsing without the use of JDK's URL. Moreover, URL is deprecated since JDK 20, and recommended URI class does not support the delayed parsing property.

https://bugs.openjdk.org/browse/JDK-8295750

microsoft/openjdk-jdk21u@bd41428

Actual behavior

Import from cURL fails with Cannot invoke "String.length()" because "spec" is null.

image

Steps to reproduce the problem

Use "Import from cURL" feature in JMeter and use JMeter parameter syntax (e.g. ${var}) in the location or URL parameter.

JMeter Version

5.6.3

Java Version

openjdk version "21.0.5" 2024-10-15 LTS

OS Version

No response

@Harshan01 Harshan01 changed the title BasicCurlParser does not support parameterized host/authority in Java 21 BasicCurlParser does not support parameterized host/authority in JDK 21 Dec 25, 2024
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