FullHttpRequest (@NotNull FullHttpRequest httpRequest) { try { URI uri = new URI(httpRequest.uri()); if (uri.getHost() != null) { URI patchedRequestURI = new URI(null, null, null, -1, uri.getPath(), uri.getQuery(), uri.getFragment()); FullHttpRequest httpRequestCopy = httpRequest.copy(); httpRequestCopy.setUri(patchedRequestURI.toString()); return httpRequestCopy; } } catch (URISyntaxException ignored) { } return httpRequest; }