public class LaxURI
extends org.apache.commons.httpclient.URI
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
HTTP_SCHEME |
protected static char[] |
HTTPS_SCHEME |
protected static BitSet |
lax_abs_path |
protected static BitSet |
lax_query |
protected static BitSet |
lax_rel_path |
protected static BitSet |
lax_rel_segment |
_authority, _fragment, _host, _is_abs_path, _is_hier_part, _is_hostname, _is_IPv4address, _is_IPv6reference, _is_net_path, _is_opaque_part, _is_reg_name, _is_rel_path, _is_server, _opaque, _path, _port, _query, _scheme, _uri, _userinfo, abs_path, absoluteURI, allowed_abs_path, allowed_authority, allowed_fragment, allowed_host, allowed_IPv6reference, allowed_opaque_part, allowed_query, allowed_reg_name, allowed_rel_path, allowed_userinfo, allowed_within_authority, allowed_within_path, allowed_within_query, allowed_within_userinfo, alpha, alphanum, authority, control, defaultDocumentCharset, defaultDocumentCharsetByLocale, defaultDocumentCharsetByPlatform, defaultProtocolCharset, delims, digit, disallowed_opaque_part, disallowed_rel_path, domainlabel, escaped, fragment, hash, hex, hier_part, host, hostname, hostport, IPv4address, IPv6address, IPv6reference, mark, net_path, opaque_part, param, path, path_segments, pchar, percent, port, protocolCharset, query, reg_name, rel_path, rel_segment, relativeURI, reserved, rootPath, scheme, segment, server, space, toplabel, unreserved, unwise, URI_reference, uric, uric_no_slash, userinfo, within_userinfo| Constructor and Description |
|---|
LaxURI() |
LaxURI(String uri,
boolean escaped) |
LaxURI(String uri,
boolean escaped,
String charset) |
LaxURI(org.apache.commons.httpclient.URI base,
org.apache.commons.httpclient.URI relative) |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
decode(char[] component,
String charset) |
protected static String |
decode(String component,
String charset) |
String |
getPath() |
String |
getPathQuery() |
String |
getURI() |
protected BitSet |
lax(BitSet generous)
Given a BitSet -- typically one of the URI superclass's
predefined static variables -- possibly replace it with
a more-lax version to better match the character sets
actually left unencoded in web browser requests
|
protected void |
parseAuthority(String original,
boolean escaped)
Coalesce the _host and _authority fields where
possible.
|
protected void |
parseUriReference(String original,
boolean escaped)
IA OVERRIDDEN IN LaxURI TO INCLUDE FIX FOR
http://issues.apache.org/jira/browse/HTTPCLIENT-588
AND
http://webteam.archive.org/jira/browse/HER-1268
In order to avoid any possilbity of conflict with non-ASCII characters,
Parse a URI reference as a
String with the character
encoding of the local system or the document. |
protected void |
setURI()
Coalesce _scheme to existing instances, where appropriate.
|
protected boolean |
validate(char[] component,
BitSet generous) |
protected boolean |
validate(char[] component,
int soffset,
int eoffset,
BitSet generous) |
clone, compareTo, encode, equals, equals, getAboveHierPath, getAuthority, getCurrentHierPath, getDefaultDocumentCharset, getDefaultDocumentCharsetByLocale, getDefaultDocumentCharsetByPlatform, getDefaultProtocolCharset, getEscapedAboveHierPath, getEscapedAuthority, getEscapedCurrentHierPath, getEscapedFragment, getEscapedName, getEscapedPath, getEscapedPathQuery, getEscapedQuery, getEscapedURI, getEscapedURIReference, getEscapedUserinfo, getFragment, getHost, getName, getPort, getProtocolCharset, getQuery, getRawAboveHierPath, getRawAuthority, getRawCurrentHierPath, getRawCurrentHierPath, getRawFragment, getRawHost, getRawName, getRawPath, getRawPathQuery, getRawQuery, getRawScheme, getRawURI, getRawURIReference, getRawUserinfo, getScheme, getURIReference, getUserinfo, hasAuthority, hasFragment, hashCode, hasQuery, hasUserinfo, indexFirstOf, indexFirstOf, indexFirstOf, indexFirstOf, isAbsoluteURI, isAbsPath, isHierPart, isHostname, isIPv4address, isIPv6reference, isNetPath, isOpaquePart, isRegName, isRelativeURI, isRelPath, isServer, normalize, normalize, prevalidate, removeFragmentIdentifier, resolvePath, setDefaultDocumentCharset, setDefaultProtocolCharset, setEscapedAuthority, setEscapedFragment, setEscapedPath, setEscapedQuery, setFragment, setPath, setQuery, setRawAuthority, setRawFragment, setRawPath, setRawQuery, toStringprotected static final char[] HTTP_SCHEME
protected static final char[] HTTPS_SCHEME
protected static final BitSet lax_rel_segment
protected static final BitSet lax_abs_path
protected static final BitSet lax_rel_path
protected static final BitSet lax_query
public LaxURI(String uri, boolean escaped, String charset) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIExceptionpublic LaxURI(org.apache.commons.httpclient.URI base,
org.apache.commons.httpclient.URI relative)
throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIExceptionpublic LaxURI(String uri, boolean escaped) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIExceptionpublic LaxURI()
public String getURI() throws org.apache.commons.httpclient.URIException
getURI in class org.apache.commons.httpclient.URIorg.apache.commons.httpclient.URIExceptionpublic String getPath() throws org.apache.commons.httpclient.URIException
getPath in class org.apache.commons.httpclient.URIorg.apache.commons.httpclient.URIExceptionpublic String getPathQuery() throws org.apache.commons.httpclient.URIException
getPathQuery in class org.apache.commons.httpclient.URIorg.apache.commons.httpclient.URIExceptionprotected static String decode(char[] component, String charset) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIExceptionprotected static String decode(String component, String charset) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIExceptionprotected boolean validate(char[] component,
BitSet generous)
validate in class org.apache.commons.httpclient.URIprotected boolean validate(char[] component,
int soffset,
int eoffset,
BitSet generous)
validate in class org.apache.commons.httpclient.URIprotected BitSet lax(BitSet generous)
generous - original BitSetprotected void parseAuthority(String original, boolean escaped) throws org.apache.commons.httpclient.URIException
parseAuthority in class org.apache.commons.httpclient.URIorg.apache.commons.httpclient.URIExceptionURI.parseAuthority(java.lang.String, boolean)protected void setURI()
setURI in class org.apache.commons.httpclient.URIURI.setURI()protected void parseUriReference(String original, boolean escaped) throws org.apache.commons.httpclient.URIException
String with the character
encoding of the local system or the document.
The following line is the regular expression for breaking-down a URI reference into its components.
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
12 3 4 5 6 7 8 9
For example, matching the above expression to http://jakarta.apache.org/ietf/uri/#Related results in the following subexpression matches:
$1 = http:
scheme = $2 = http
$3 = //jakarta.apache.org
authority = $4 = jakarta.apache.org
path = $5 = /ietf/uri/
$6 =
query = $7 =
$8 = #Related
fragment = $9 = Related
parseUriReference in class org.apache.commons.httpclient.URIoriginal - the original character sequenceescaped - true if original is escapedorg.apache.commons.httpclient.URIException - If an error occurs.Copyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.