quarkus: Resteasy-reactive and rest-client: propagation of headers doesn't work

Describe the bug

Hi, I have a production project using quarkus-resteasy(-jsonb) and quarkus-rest-client.

I wanted to give a try to the new quarkus-resteasy-reactive(-jsonb) extension so I replaced quarkus-resteasy-jsonb by this one in my pom. Everything compiles without any change to the code or config and the app starts without error but I noticed that the headers are not propagated from my endpoints to the rest clients anymore.

For headers propagation I use the DefaultClientHeadersFactoryImpl (by annotating my clients with @RegisterClientHeaders) with the org.eclipse.microprofile.rest.client.propagateHeaders property.

EDIT: I tried to implement the behavior myself with a custom ClientHeadersFactory, but the header is also null in the incomingHeaders MultivaluedMap.

From my readings of this blog article, I assume that resteasy-reactive and rest-client should be compatible (and except this issue, it seems to work), so it looks like a bug.

Expected behavior

The headers that are part of the original request should be propagated to the rest client, like it was the case with quarkus-resteasy.

Actual behavior

The headers are not propagated.

To Reproduce

I could create a small reproducer but it doesn’t seem necessary as I’m just using standard behavior. If you disagree, let me know and I’ll add one.

Configuration

# Add your application.properties here, if applicable.
org.eclipse.microprofile.rest.client.propagateHeaders=Authorization

Environment (please complete the following information):

Output of uname -a or ver

Linux and Windows

Output of java -version

openjdk version “11.0.7” 2020-04-14 LTS OpenJDK Runtime Environment 20.4-(Zulu-11.39+15-win_x64)-Microsoft-Azure-restricted (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM 20.4-(Zulu-11.39+15-win_x64)-Microsoft-Azure-restricted (build 11.0.7+10-LTS, mixed mode)

GraalVM version (if different from Java)

Not using native builds

Quarkus version or git rev

1.12.2

Build tool (ie. output of mvnw --version or gradlew --version)

mvn 3.6.3

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 26 (17 by maintainers)

Most upvoted comments

I am going to close this as this works properly when using RESTEasy Reactive and the Reactive REST Client

Ok @geoand, I’ll do that. Thanks.