public ServletServletRequest(final HttpServletRequest req, final String tmpdir, final boolean multipart) throws IOException { this.req = requireNonNull(req, "HTTP req is required."); this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required."); this.multipart = multipart; String pathInfo = req.getPathInfo(); if (pathInfo == null) { pathInfo = "/"; } this.path = req.getContextPath() + Router.decode(pathInfo); }
public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException { this.exchange = exchange; this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking()); this.conf = conf; this.path = Router.decode(exchange.getRequestPath()); }
public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req, final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) { this.ctx = ctx; this.req = req; this.responseHeaders = responseHeaders; this.tmpdir = tmpdir; this.query = new QueryStringDecoder(req.uri()); this.path = Router.decode(query.path()); this.wsMaxMessageSize = wsMaxMessageSize; Channel channel = ctx.channel(); channel.attr(ASYNC).set(false); }
public ServletServletRequest(final HttpServletRequest req, final String tmpdir, final boolean multipart) throws IOException { this.req = requireNonNull(req, "HTTP req is required."); this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required."); this.multipart = multipart; String pathInfo = req.getPathInfo(); if (pathInfo == null) { pathInfo = "/"; } this.path = req.getContextPath() + Router.decode(pathInfo); }
public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException { this.exchange = exchange; this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking()); this.conf = conf; this.path = Router.decode(exchange.getRequestPath()); }
public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req, final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) { this.ctx = ctx; this.req = req; this.responseHeaders = responseHeaders; this.tmpdir = tmpdir; this.query = new QueryStringDecoder(req.uri()); this.path = Router.decode(query.path()); this.wsMaxMessageSize = wsMaxMessageSize; Channel channel = ctx.channel(); channel.attr(ASYNC).set(false); }