private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest req, String ip) {
        String uri = req.getUri();
        FullHttpResponse resp = null;
        if (uri.equalsIgnoreCase(STATUS)) {
            ManagerDB.addOrUpdateRequestAmount(ip, dateFormat.format(new Date()));
            ServerStatus.addRequest();
            PageStatus page = new PageStatus();
            String send = page.getPage();
            ByteBuf buf = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer(send, CharsetUtil.US_ASCII));
            resp = new DefaultFullHttpResponse(HTTP_1_1, OK, buf);
            resp.headers().set(CONTENT_TYPE, "text/HTML");
            resp.headers().set(CONTENT_LENGTH, resp.content().readableBytes());
            sendHttpResponse(ctx, req, resp);
            trafficLog();

            ManagerDB.insertConnection(ip, uri, dateFormat.format(new Date()), sentBytes, receivedBytes, speed);

        } else if (uri.equalsIgnoreCase(HELLO)) {
            try {
                Thread.sleep(TIMESLEEP * 1000);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
            Page page = new PageHello();
            ManagerDB.addOrUpdateRequestAmount(ip, dateFormat.format(new Date()));
            ServerStatus.addRequest();
            String send = page.getPage();
            ByteBuf buf = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer(send, CharsetUtil.US_ASCII));
            resp = new DefaultFullHttpResponse(HTTP_1_1, OK, buf);
            resp.headers().set(CONTENT_TYPE, "text/HTML");
            resp.headers().set(CONTENT_LENGTH, resp.content().readableBytes());
            sendHttpResponse(ctx, req, resp);
            trafficLog();

            ManagerDB.insertConnection(ip, uri, dateFormat.format(new Date()), sentBytes, receivedBytes, speed);

        } else if (uri.toLowerCase().contains(REDIRECT) && uri.toLowerCase().contains("url")) {
            ManagerDB.addOrUpdateRequestAmount(ip, dateFormat.format(new Date()));
            ServerStatus.addRequest();
            String redirect;
            if (uri.toLowerCase().contains("http://")) {
                redirect = uri.substring(14);
            } else {
                redirect = "http://" + uri.substring(14);
            }
            ByteBuf buf23 = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer("", CharsetUtil.US_ASCII));
            resp = new DefaultFullHttpResponse(HTTP_1_1, TEMPORARY_REDIRECT, buf23);
            resp.headers().set(LOCATION, redirect);
            sendHttpResponse(ctx, req, resp);
            trafficLog();
            ManagerDB.insertConnection(ip, uri, dateFormat.format(new Date()), sentBytes, receivedBytes, speed);
        } else {
            ByteBuf buf2 = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer("404 page not found", CharsetUtil.US_ASCII));
            resp = new DefaultFullHttpResponse(HTTP_1_1, OK, buf2);
            resp.headers().set(CONTENT_TYPE, "text/plain");
            resp.headers().set(CONTENT_LENGTH, resp.content().readableBytes());
            sendHttpResponse(ctx, req, resp);
        }
    }