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

Reactive HTTP header adapters don't print header values in toString [SPR-17546] #22078

Closed
spring-issuemaster opened this issue Nov 28, 2018 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Nov 28, 2018

Yin Jifeng opened SPR-17546 and commented

private String formatHeaders(HttpHeaders responseHeaders) {
     return this.enableLoggingRequestDetails ?
               responseHeaders.toString() : responseHeaders.isEmpty() ? "{}" : "{masked}";
}

The responseHeaders goes with 'ReadOnlyHttpHeaders' -> 'HttpHeaders' -> NettyHeadersAdapters, and NettyHeadersAdapters has no

public String toString() {
    return this.headers.toString();
}

Affects: 5.1.3

Reference URL: https://github.com/spring-projects/spring-framework/blob/v5.1.3.RELEASE/spring-web/src/main/java/org/springframework/web/server/adapter/HttpWebHandlerAdapter.java#L271-L274

Referenced from: commits 8eef97d

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 28, 2018

Rossen Stoyanchev commented

Indeed, thanks for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.