/** * Get the destination address of the HTTP request. * * @return the destination address of the HTTP request */ public InetSocketAddress getDestinationAddress() { if (destinationAddress != null) { return destinationAddress; } return connection.getLocalAddress(InetSocketAddress.class); }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return Integer.toString(localAddress.getPort()); }
@Override public String readAttribute(HttpServerExchange exchange) { try { return exchange.getConnection().getLocalAddress(InetSocketAddress.class).getHostName(); } catch (Throwable e) { return "localhost"; } }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return localAddress.getAddress().getHostAddress(); }
@Override public int getConfidentialPort(HttpServerExchange exchange) { int port = exchange.getConnection().getLocalAddress(InetSocketAddress.class).getPort(); if (port<0){ UndertowLogger.ROOT_LOGGER.debugf("Confidential port not defined for port %s", port); } return host.getValue().getServer().getValue().lookupSecurePort(port); } };
final InetSocketAddress addr = exchange.getConnection().getLocalAddress(InetSocketAddress.class); if (!addr.isUnresolved() && addr.getPort() != config.getManagementSocketAddress().getPort() || !Arrays.equals(addr.getAddress().getAddress(), config.getManagementSocketAddress().getAddress().getAddress())) { next.handleRequest(exchange);
request.putAttachment(ProxiedRequestAttachments.SERVER_PORT, port); } catch (NumberFormatException e) { int port = exchange.getConnection().getLocalAddress(InetSocketAddress.class).getPort(); request.getRequestHeaders().put(Headers.X_FORWARDED_PORT, port); request.putAttachment(ProxiedRequestAttachments.SERVER_PORT, port);
/** * Get the destination address of the HTTP request. * * @return the destination address of the HTTP request */ public InetSocketAddress getDestinationAddress() { if (destinationAddress != null) { return destinationAddress; } return connection.getLocalAddress(InetSocketAddress.class); }
/** * Get the destination address of the HTTP request. * * @return the destination address of the HTTP request */ public InetSocketAddress getDestinationAddress() { if (destinationAddress != null) { return destinationAddress; } return connection.getLocalAddress(InetSocketAddress.class); }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return Integer.toString(localAddress.getPort()); }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return Integer.toString(localAddress.getPort()); }
@Override public String readAttribute(HttpServerExchange exchange) { try { return exchange.getConnection().getLocalAddress(InetSocketAddress.class).getHostName(); } catch (Throwable e) { return "localhost"; } }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return localAddress.getAddress().getHostAddress(); }
@Override public String readAttribute(HttpServerExchange exchange) { try { return exchange.getConnection().getLocalAddress(InetSocketAddress.class).getHostName(); } catch (Throwable e) { return "localhost"; } }
@Override public String readAttribute(final HttpServerExchange exchange) { InetSocketAddress localAddress = (InetSocketAddress) exchange.getConnection().getLocalAddress(); return localAddress.getAddress().getHostAddress(); }
@Override public int getConfidentialPort(HttpServerExchange exchange) { int port = exchange.getConnection().getLocalAddress(InetSocketAddress.class).getPort(); if (port<0){ UndertowLogger.ROOT_LOGGER.debugf("Confidential port not defined for port %s", port); } return host.getValue().getServer().getValue().lookupSecurePort(port); } };
@Override public int getConfidentialPort(HttpServerExchange exchange) { int port = exchange.getConnection().getLocalAddress(InetSocketAddress.class).getPort(); if (port<0){ UndertowLogger.ROOT_LOGGER.debugf("Confidential port not defined for port %s", port); } return host.getValue().getServer().getValue().lookupSecurePort(port); } };
final InetSocketAddress addr = exchange.getConnection().getLocalAddress(InetSocketAddress.class); if (!addr.isUnresolved() && addr.getPort() != config.getManagementSocketAddress().getPort() || !Arrays.equals(addr.getAddress().getAddress(), config.getManagementSocketAddress().getAddress().getAddress())) { next.handleRequest(exchange);
final InetSocketAddress addr = exchange.getConnection().getLocalAddress(InetSocketAddress.class); if (!addr.isUnresolved() && addr.getPort() != config.getManagementSocketAddress().getPort() || !Arrays.equals(addr.getAddress().getAddress(), config.getManagementSocketAddress().getAddress().getAddress())) { next.handleRequest(exchange);
exchange.getConnection().getLocalAddress(InetSocketAddress.class).getPort() ); final HttpServerExchange mockExchange = new HttpServerExchange(connection);