public static boolean isMultipart(DiscFilterRequest request) {
        if (request == null) {
            return false;
        }

        String contentType = request.getContentType();

        if (contentType == null) {
            return false;
        }

        String[] parts = Pattern.compile(";").split(contentType);
        if (parts.length == 0) {
            return false;
        }

        for (String part : parts) {
            if ("multipart/form-data".equals(part)) {
                return true;
            }
        }

        return false;
    }
@Test
    void testIsMultipart() {

        URI uri = URI.create("http://localhost:8080/test");
        HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
        httpReq.headers().add(HttpHeaders.Names.CONTENT_TYPE, "multipart/form-data");
        DiscFilterRequest request = new DiscFilterRequest(httpReq);

        assertTrue(DiscFilterRequest.isMultipart(request));

        httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
        httpReq.headers().add(HttpHeaders.Names.CONTENT_TYPE, "text/html;charset=UTF-8");
        request = new DiscFilterRequest(httpReq);

        assertFalse(DiscFilterRequest.isMultipart(request));

        assertFalse(DiscFilterRequest.isMultipart(null));


        httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
        request = new DiscFilterRequest(httpReq);
        assertFalse(DiscFilterRequest.isMultipart(request));
    }