Skip to content

URI Template Reserved Expansion {+path,x}/here #11188

@zx-max

Description

@zx-max

Expected Behavior

Given this uri template: {+path,x}/here
as described in: rfc6570 section-3.2.3

If a write a method in a controller who use it

@Get("/section-323{+path,x}/here")
void reserved_expansion_with_multiple_variables(@Nullable String path, @Nullable String x) {
	...
}

And i send a request with the example values:
path=/foo/bar
x=1024

When the controller receive the http request, for the variables, i expect this values :
path=/foo/bar
x=1024

Actual Behaviour

The values assigned to the variables are:
path = /
and x = foo/bar,1024

Steps To Reproduce

to reproduce, just run the test here:

test on git hub

https://github.com/zx-max/micronaut-tutorial/blob/main/uri-templates/demo/src/main/java/http/client/UriTemplateExpanderSpecController.java

Environment Information

I use window, jdk 21, the project has been created from command line with this command:

mn  -v create-app   `
http.client.demo `
    --build=gradle_kotlin  `
    --lang=java  `
    --java-version=21 `
    --test=junit  `
    --features=http-client

Example Application

https://github.com/zx-max/micronaut-tutorial/tree/main/uri-templates/demo

Version

4.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions