-
Notifications
You must be signed in to change notification settings - Fork 356
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
NettyConnector - HOST header contains port & 307 works with buffered post #5800
NettyConnector - HOST header contains port & 307 works with buffered post #5800
Conversation
…post Signed-off-by: jansupol <jan.supol@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jerseyRequest.setStreamProvider(new OutboundMessageContext.StreamProvider() {
@OverRide
public OutputStream getOutputStream(int contentLength) throws IOException {
replaceHeaders(jerseyRequest, nettyRequest.headers()); // WriterInterceptor changes
if (!nettyRequest.headers().contains(HttpHeaderNames.HOST)) {
nettyRequest.headers().add(HttpHeaderNames.HOST, jerseyRequest.getUri().getHost());
}
headersSet.countDown();
return entityWriter.getOutputStream();
}
});
port needs to be added here as well.
Host header contains port for non 80 & 443 ports
Status 307 with post and buffered entity does not hang