Package org.eclipse.jetty.http
Class HttpURI
- java.lang.Object
-
- org.eclipse.jetty.http.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 URIhttp://user@host:port/path/info;param?query#fragment
this class will split it into the following undecoded optional elements:getScheme()
- http:getAuthority()
- //name@host:portgetHost()
- hostgetPort()
- portgetPath()
- /path/infogetParam()
- paramgetQuery()
- querygetFragment()
- fragment
Any parameters will be returned from
getPath()
, but are excluded from the return value ofgetDecodedPath()
. If there are multiple parameters, thegetParam()
method returns only the last one.
-
-
Constructor Summary
Constructors Constructor Description HttpURI()
Deprecated.HttpURI(String uri)
Deprecated.HttpURI(String scheme, String host, int port, String pathQuery)
Deprecated.HttpURI(String scheme, String host, int port, String path, String param, String query, String fragment)
Deprecated.HttpURI(URI uri)
Deprecated.HttpURI(HttpURI uri)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.static HttpURI
createHttpURI(String scheme, String host, int port, String path, String param, String query, String fragment)
Deprecated.Construct a normalized URI.void
decodeQueryTo(MultiMap<String> parameters)
Deprecated.void
decodeQueryTo(MultiMap<String> parameters, String encoding)
Deprecated.void
decodeQueryTo(MultiMap<String> parameters, Charset encoding)
Deprecated.boolean
equals(Object o)
Deprecated.String
getAuthority()
Deprecated.String
getDecodedPath()
Deprecated.String
getFragment()
Deprecated.String
getHost()
Deprecated.String
getParam()
Deprecated.String
getPath()
Deprecated.The parsed Path.String
getPathQuery()
Deprecated.int
getPort()
Deprecated.String
getQuery()
Deprecated.String
getScheme()
Deprecated.String
getUser()
Deprecated.boolean
hasAmbiguousParameter()
Deprecated.boolean
hasAmbiguousSegment()
Deprecated.boolean
hasAmbiguousSeparator()
Deprecated.int
hashCode()
Deprecated.boolean
hasQuery()
Deprecated.boolean
isAbsolute()
Deprecated.boolean
isAmbiguous()
Deprecated.void
parse(String uri)
Deprecated.void
parse(String uri, int offset, int length)
Deprecated.void
parseConnect(String uri)
Deprecated.void
parseRequestTarget(String method, String uri)
Deprecated.Parse according to https://tools.ietf.org/html/rfc7230#section-5.3void
setAuthority(String host, int port)
Deprecated.void
setParam(String param)
Deprecated.void
setPath(String path)
Deprecated.void
setPathQuery(String pathQuery)
Deprecated.void
setQuery(String query)
Deprecated.void
setScheme(String scheme)
Deprecated.String
toString()
Deprecated.URI
toURI()
Deprecated.
-
-
-
Constructor Detail
-
HttpURI
public HttpURI()
Deprecated.
-
HttpURI
public HttpURI(String scheme, String host, int port, String path, String param, String query, String fragment)
Deprecated.
-
HttpURI
public HttpURI(HttpURI uri)
Deprecated.
-
HttpURI
public HttpURI(String uri)
Deprecated.
-
HttpURI
public HttpURI(URI uri)
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 schemehost
- the URI hoseport
- the URI portpath
- the URI pathparam
- the URI paramquery
- the URI queryfragment
- 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 methoduri
- the request uri
-
parseConnect
@Deprecated public void parseConnect(String uri)
Deprecated.
-
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 '..;'
-
isAmbiguous
public boolean isAmbiguous()
Deprecated.- Returns:
- True if the URI has either an
hasAmbiguousSegment()
orhasAmbiguousSeparator()
.
-
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.
-
getDecodedPath
public String getDecodedPath()
Deprecated.- Returns:
- The decoded canonical path.
- See Also:
URIUtil.canonicalPath(String)
-
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, String encoding) throws UnsupportedEncodingException
Deprecated.- Throws:
UnsupportedEncodingException
-
decodeQueryTo
public void decodeQueryTo(MultiMap<String> parameters, Charset encoding) throws UnsupportedEncodingException
Deprecated.- Throws:
UnsupportedEncodingException
-
isAbsolute
public boolean isAbsolute()
Deprecated.
-
setScheme
public void setScheme(String scheme)
Deprecated.
-
setAuthority
public void setAuthority(String host, int port)
Deprecated.- Parameters:
host
- the hostport
- 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.
-
toURI
public URI toURI() throws URISyntaxException
Deprecated.- Throws:
URISyntaxException
-
getPathQuery
public String getPathQuery()
Deprecated.
-
getAuthority
public String getAuthority()
Deprecated.
-
getUser
public String getUser()
Deprecated.
-
-