/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
private MappingData updatePaths(GrizzlyRequest r, Mapper mapper) { final Request req = r.getRequest(); try { MessageBytes decodedURI = req.decodedURI(); decodedURI.duplicate(req.requestURI()); HttpRequestURIDecoder.decode(decodedURI, urlDecoder, null, null); MappingData data = new MappingData(); mapper.map(req.remoteHost(), decodedURI, data); pathInfo = data.pathInfo.toString(); servletPath = data.wrapperPath.toString(); contextPath = data.contextPath.toString(); return data; } catch (Exception e) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Unable to map request", e); } pathInfo = null; servletPath = null; contextPath = null; } return null; }
remoteHost = remoteAddr; } else { // all we can do is punt request.remoteHost().recycle(); request.remoteHost().setString(remoteHost);
remoteHost = remoteAddr; } else { // all we can do is punt request.remoteHost().recycle(); request.remoteHost().setString(remoteHost);