}
public RubyHash getEnv(final HttpServerRequest request,
final RackInput input,
final boolean isSSL) throws IOException {
MultiMap headers = request.headers();
final RackEnvironmentHash env = new RackEnvironmentHash(runtime, headers, rackKeyMap);
env.lazyPut(RACK_KEY.RACK_INPUT, input, false);
env.lazyPut(RACK_KEY.RACK_ERRORS, errors, false);
String pathInfo = request.path();
String scriptName = "";
String[] hostInfo = getHostInfo(request.headers().get(Const.HOST));
env.lazyPut(RACK_KEY.REQUEST_METHOD, request.method(), true);
env.lazyPut(RACK_KEY.SCRIPT_NAME, scriptName, false);
env.lazyPut(RACK_KEY.PATH_INFO, pathInfo, false);
env.lazyPut(RACK_KEY.QUERY_STRING, orEmpty(request.query()), false);
env.lazyPut(RACK_KEY.SERVER_NAME, hostInfo[0], false);
env.lazyPut(RACK_KEY.SERVER_PORT, hostInfo[1], true);
env.lazyPut(RACK_KEY.HTTP_VERSION,
request.version() == HttpVersion.HTTP_1_1 ? Const.HTTP_11 : Const.HTTP_10, true);
env.lazyPut(RACK_KEY.CONTENT_TYPE, headers.get(HttpHeaders.Names.CONTENT_TYPE), true);
env.lazyPut(RACK_KEY.REQUEST_URI, request.uri(), false);
env.lazyPut(RACK_KEY.REMOTE_ADDR, getRemoteAddr(request), true);
env.lazyPut(RACK_KEY.URL_SCHEME, isSSL ? Const.HTTPS : Const.HTTP, true);
env.lazyPut(RACK_KEY.VERSION, rackVersion, false);
env.lazyPut(RACK_KEY.MULTITHREAD, runtime.getTrue(), false);