mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-27 01:14:46 +00:00
Add port to Host http header if necessary
This commit is contained in:
parent
6020adef6b
commit
d5f1a2c817
@ -86,7 +86,7 @@ public final class HttpRequestHandler extends SimpleChannelInboundHandler<HttpOb
|
|||||||
{
|
{
|
||||||
request.headers().set( HttpHeaderNames.USER_AGENT, this.request.environment().getComputerEnvironment().getUserAgent() );
|
request.headers().set( HttpHeaderNames.USER_AGENT, this.request.environment().getComputerEnvironment().getUserAgent() );
|
||||||
}
|
}
|
||||||
request.headers().set( HttpHeaderNames.HOST, uri.getHost() );
|
request.headers().set( HttpHeaderNames.HOST, uri.getPort() < 0 ? uri.getHost() : uri.getHost() + ":" + uri.getPort() );
|
||||||
request.headers().set( HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE );
|
request.headers().set( HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE );
|
||||||
|
|
||||||
ctx.channel().writeAndFlush( request );
|
ctx.channel().writeAndFlush( request );
|
||||||
|
Loading…
Reference in New Issue
Block a user