Class DefaultH2RequestConverter

    • Constructor Detail

      • DefaultH2RequestConverter

        public DefaultH2RequestConverter()
    • Method Detail

      • validatePathPseudoHeader

        private void validatePathPseudoHeader​(java.lang.String method,
                                              java.lang.String scheme,
                                              java.lang.String path)
                                       throws ProtocolException
        Validates the :path pseudo-header field based on the provided HTTP method and scheme.

        This method performs the following validations:

        • Non-Empty Path: For 'http' or 'https' URIs, the :path pseudo-header field must not be empty.
        • OPTIONS Method: If the HTTP method is OPTIONS and the URI does not contain a path component, the :path pseudo-header field must have a value of '*'.
        • Path Starting with '/': For 'http' or 'https' URIs, the :path pseudo-header field must either start with '/' or be '*'.
        Parameters:
        method - The HTTP method of the request, e.g., GET, POST, OPTIONS, etc.
        scheme - The scheme of the request, e.g., http or https.
        path - The value of the :path pseudo-header field.
        Throws:
        ProtocolException - if any of the validations fail.