Skip to content

Utils.resolveUri incorrectly resolves nested paths breaking JDK HttpClient transports #701

@chemicL

Description

@chemicL

The following reproducer:

    public static void main(String[] args) {
        System.out.println("URI: " + resolveUri(URI.create("https://example.com/some"), "/path").toString());
    }

prints

https://example.com/path

while it should be

https://example.com/some/path

This affects usages of HttpClientSseClientTransport and HttpClientStreamableHttpTransport with base

It's not used for WebClient-based transports which are free from this defect.

java-sdk version: 0.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clientduplicateThis issue or pull request already existsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions