helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.44k stars 562 forks source link

Requested URI path omits some path segments depending on how the service/handler is registered #8818

Closed tjquinno closed 1 month ago

tjquinno commented 1 month ago

Environment Details


Problem Description

In 4.0.0, invoking request.requestedUri().toUri().toString() returned the entire path.

Beginning in 4.0.1, it omits path elements that are mentioned when the service is registered.

Steps to reproduce

  1. Revise the SE QuickStart example to add this line to GreetService#getDefaultMessageHandler:

    System.err.println("Requested URI: " + request.requestedUri().toUri().toString());
  2. Make sure the pom specifies Helidon version 4.0.0.
  3. Build and run, then run curl http://localhost:8080/greet and you see

    Requested URI: http://localhost:8080/greet
  4. Now, change the Helidon version in the pom's parent specification to 4.0.1, rebuild, rerun, and access the app again. You see this output (missing path):

    Requested URI: http://localhost:8080/