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-projects-issues opened this issue Nov 28, 2018 · 1 comment
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues 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-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants