public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }
public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }
public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }
public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }
public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }
public HttpContent composeHeaders() { String host = getServerHostName(); if (port != -1 && port != 80 && port != 443) { host += ":" + getPort(); } builder.uri(getResourcePath()) .header(Header.Host, host); if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } else { builder.removeHeader(Constants.SEC_WS_EXTENSIONS_HEADER); } if (!getSubProtocol().isEmpty()) { builder.header(Constants.SEC_WS_PROTOCOL_HEADER, join(getSubProtocol())); } return HttpContent.builder(builder.build()).build(); }