Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger logs unsent request headers even though Default in Client has restricted headers #2682

Open
facewise opened this issue Dec 4, 2024 · 0 comments

Comments

@facewise
Copy link

facewise commented Dec 4, 2024

Since the default class Default in Client uses sun.net.www.protocol.http.HttpURLConnection, which has the set of restricted headers, even if I add a header using RequestTemplate#header(String, String), the actual HTTP request does not contain the header.

However feign.Logger logs not the actual request but the Request made by SynchronousMethodHandler#executeAndDecode(), which contains the restricted header I have added.

This inconsistency made me hard to discover the problem because there's no such documentation tells the logged request may not be the same as the actual HTTP request.

I hope to add some documentation that tells RequestTemplate you applied may not be the actual request or, if possible, make Logger logs the actual HTTP request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant