private void handleOtherRequest(String pathInfo, HttpServletResponse response) throws IOException {
        String[] parts = pathInfo.split("/");
        // Image request must be in correct format.
        if (parts.length < 3) {
            Log.trace("Unable to handle 'other' request (not enough path parts): {}", pathInfo);
            response.setStatus(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

        String contextPath = "";
        int index = pathInfo.indexOf(parts[1]);
        if (index != -1) {
            contextPath = pathInfo.substring(index + parts[1].length() + 1);
        }

        Path pluginDirectory = JiveGlobals.getHomePath().resolve("plugins");
        Path file = pluginDirectory.resolve(parts[1]).resolve("web").resolve(contextPath);

        if ( !ALLOW_LOCAL_FILE_READING.getValue() ) {
            // Ensure that the file that's being served is a file that is part of Openfire. This guards against
            // accessing files from the operating system, or other files that shouldn't be accessible via the web (OF-1886).
            final Path absoluteHome = JiveGlobals.getHomePath().normalize().toAbsolutePath();
            final Path absoluteLookup = file.normalize().toAbsolutePath();
            if ( !absoluteLookup.startsWith( absoluteHome ) )
            {
                Log.trace("Unable to handle 'other' request (forbidden path): {}", pathInfo);
                response.setStatus( HttpServletResponse.SC_FORBIDDEN );
                return;
            }
        }

        if (!Files.exists(file)) {
            Log.trace("Unable to handle 'other' request (not found): {}", pathInfo);
            response.setStatus(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

        String contentType = getServletContext().getMimeType(pathInfo);
        if (contentType == null) {
            contentType = "text/plain";
        }
        response.setContentType(contentType);
        // Write out the resource to the user.
        Log.trace("Handling 'other' request with a response content type of {}: {}", contentType, pathInfo);
        // Set the size of the file.
        response.setContentLength((int) Files.size(file));
        Files.readAllBytes(file);

        try (final BufferedInputStream in = new BufferedInputStream(Files.newInputStream(file));
             final ServletOutputStream out = response.getOutputStream())
        {
            // Use a 32K buffer.
            final byte[] buf = new byte[32*1024];
            int len;
            while ((len = in.read(buf)) != -1) {
                out.write(buf, 0, len);
            }
        }
    }
Handles a request for other web items (images, etc.)

@param pathInfo the extra path info.
@param response the response object.
@throws IOException if an IOException occurs while handling the request.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java