Class HttpURI


  • @Deprecated(since="2021-05-27")
    public class HttpURI
    extends Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Http URI. Parse an HTTP URI from a string or byte array. Given a URI http://user@host:port/path/info;param?query#fragment this class will split it into the following undecoded optional elements:

    Any parameters will be returned from getPath(), but are excluded from the return value of getDecodedPath(). If there are multiple parameters, the getParam() method returns only the last one.

    • Constructor Detail

      • HttpURI

        public HttpURI()
        Deprecated.
      • HttpURI

        public HttpURI​(HttpURI uri)
        Deprecated.
      • HttpURI

        public HttpURI​(String uri)
        Deprecated.
      • HttpURI

        public HttpURI​(URI uri)
        Deprecated.
      • HttpURI

        public HttpURI​(String scheme,
                       String host,
                       int port,
                       String pathQuery)
        Deprecated.
    • Method Detail

      • createHttpURI

        public static HttpURI createHttpURI​(String scheme,
                                            String host,
                                            int port,
                                            String path,
                                            String param,
                                            String query,
                                            String fragment)
        Deprecated.
        Construct a normalized URI. Port is not set if it is the default port.
        Parameters:
        scheme - the URI scheme
        host - the URI hose
        port - the URI port
        path - the URI path
        param - the URI param
        query - the URI query
        fragment - the URI fragment
        Returns:
        the normalized URI
      • clear

        public void clear()
        Deprecated.
      • parse

        public void parse​(String uri)
        Deprecated.
      • parseRequestTarget

        public void parseRequestTarget​(String method,
                                       String uri)
        Deprecated.
        Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
        Parameters:
        method - the request method
        uri - the request uri
      • parse

        public void parse​(String uri,
                          int offset,
                          int length)
        Deprecated.
      • hasAmbiguousSegment

        public boolean hasAmbiguousSegment()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous segment like '..;' or '%2e%2e'
      • hasAmbiguousSeparator

        public boolean hasAmbiguousSeparator()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous separator of %2f
      • hasAmbiguousParameter

        public boolean hasAmbiguousParameter()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous path parameter like '..;'
      • getScheme

        public String getScheme()
        Deprecated.
      • getHost

        public String getHost()
        Deprecated.
      • getPort

        public int getPort()
        Deprecated.
      • getPath

        public String getPath()
        Deprecated.
        The parsed Path.
        Returns:
        the path as parsed on valid URI. null for invalid URI.
      • getParam

        public String getParam()
        Deprecated.
      • setParam

        public void setParam​(String param)
        Deprecated.
      • getQuery

        public String getQuery()
        Deprecated.
      • hasQuery

        public boolean hasQuery()
        Deprecated.
      • getFragment

        public String getFragment()
        Deprecated.
      • decodeQueryTo

        public void decodeQueryTo​(MultiMap<String> parameters)
        Deprecated.
      • isAbsolute

        public boolean isAbsolute()
        Deprecated.
      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • setScheme

        public void setScheme​(String scheme)
        Deprecated.
      • setAuthority

        public void setAuthority​(String host,
                                 int port)
        Deprecated.
        Parameters:
        host - the host
        port - the port
      • setPath

        public void setPath​(String path)
        Deprecated.
        Parameters:
        path - the path
      • setPathQuery

        public void setPathQuery​(String pathQuery)
        Deprecated.
      • setQuery

        public void setQuery​(String query)
        Deprecated.
      • getPathQuery

        public String getPathQuery()
        Deprecated.
      • getAuthority

        public String getAuthority()
        Deprecated.
      • getUser

        public String getUser()
        Deprecated.