Skip to content

Request params sometimes missing in links #2301

Open
@sbertault

Description

@sbertault

Using HAL+json with spring-hateoas v2.2.5 in an app using Springboot v 3.2.X

For links generated like this

@Component
class MyResourceProcessor() : RepresentationModelProcessor<EntityModel<SomeEntity>> {
//...
    linkTo(
        methodOn(MyController::class.java)
            .getMyEntity(
                somePathVariable = valueOfPathVariable,
                someQueryParam = valueOfQueryParam
            )
    ).withRel(SOME_RELATION)

the generated href sent to frontend does not contain any request param

In the object generated at the end of the above code, href is alright. But it has lost its query params by the time the response is sent back to the client.
The path variables are ok.

Now for the weirdest part : it is not happening consistently!
For the same version of my webapp (same commit), on the same deployment environment, the bug may or may not appear.
When it does appear, it is appearing consistently : alls links generated like this always lose their query params.
I never reproduced it on localhost.

Have you ever seen anything like this?
Any path I could investigate?

Thanks

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