res = (String) TextUtils.unescapeHtml(res); if (codebaseURI != null) { res = codebaseURI.resolve(res).toString();
String prereq = curi.getUURI().resolve("/robots.txt").toString(); curi.markPrerequisite(prereq);
res = StringEscapeUtils.unescapeHtml(res); if (codebaseURI != null) { res = codebaseURI.resolve(res).toString();
/** * @return Return the 'SURT' format of this UURI */ public String getSurtForm() { if (surtForm == null) { surtForm = SURT.fromURI(this.toString()); } return surtForm; }
/** * @return Return the 'SURT' format of this UURI */ public String getSurtForm() { if (surtForm == null) { surtForm = SURT.fromURI(this.toString()); } return surtForm; }
/** * @return Return the 'SURT' format of this UURI */ public String getSurtForm() { if (surtForm == null) { surtForm = SURT.fromURI(this.toString()); } return surtForm; }
/** * @param uri URI as string. * @param charset Original encoding of the string. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(String uri, String charset) throws URIException { UsableURI uuri = makeOne(fixup(uri, null, charset), true, charset); if (logger.isLoggable(Level.FINE)) { logger.fine("URI " + uri + " PRODUCT " + uuri.toString() + " CHARSET " + charset); } return validityCheck(uuri); }
url = UsableURIFactory.getInstance(baseUrl, url).toString() + frag; } catch (URIException e) { LOGGER.warning("FAILED RESOLVE: base(" + baseUrl + ") frag(" + url +
/** * @param uri URI as string. * @param charset Original encoding of the string. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(String uri, String charset) throws URIException { UsableURI uuri = makeOne(fixup(uri, null, charset), true, charset); if (logger.isLoggable(Level.FINE)) { logger.fine("URI " + uri + " PRODUCT " + uuri.toString() + " CHARSET " + charset); } return validityCheck(uuri); }
url = UsableURIFactory.getInstance(baseUrl, url).toString() + frag; } catch (URIException e) { LOGGER.warning("FAILED RESOLVE: base(" + baseUrl + ") frag(" + url +
/** * Check the generated UURI. * * At the least look at length of uuri string. We were seeing case * where before escaping, string was < MAX_URL_LENGTH but after was * >. Letting out a too-big message was causing us troubles later * down the processing chain. * @param uuri Created uuri to check. * @return The passed <code>uuri</code> so can easily inline this check. * @throws URIException */ protected UsableURI validityCheck(UsableURI uuri) throws URIException { if (uuri.getRawURI().length > UsableURI.MAX_URL_LENGTH) { throw new URIException("Created (escaped) uuri > " + UsableURI.MAX_URL_LENGTH +": "+uuri.toString()); } return uuri; }
/** * @param uri URI as string. * @param charset Original encoding of the string. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(String uri, String charset) throws URIException { UsableURI uuri = makeOne(fixup(uri, null, charset), true, charset); if (logger.isLoggable(Level.FINE)) { logger.fine("URI " + uri + " PRODUCT " + uuri.toString() + " CHARSET " + charset); } return validityCheck(uuri); }
/** * Check the generated UURI. * * At the least look at length of uuri string. We were seeing case * where before escaping, string was < MAX_URL_LENGTH but after was * >. Letting out a too-big message was causing us troubles later * down the processing chain. * @param uuri Created uuri to check. * @return The passed <code>uuri</code> so can easily inline this check. * @throws URIException */ protected UsableURI validityCheck(UsableURI uuri) throws URIException { if (uuri.getRawURI().length > UsableURI.MAX_URL_LENGTH) { throw new URIException("Created (escaped) uuri > " + UsableURI.MAX_URL_LENGTH +": "+uuri.toString()); } return uuri; }
/** * Check the generated UURI. * * At the least look at length of uuri string. We were seeing case * where before escaping, string was < MAX_URL_LENGTH but after was * >. Letting out a too-big message was causing us troubles later * down the processing chain. * @param uuri Created uuri to check. * @return The passed <code>uuri</code> so can easily inline this check. * @throws URIException */ protected UsableURI validityCheck(UsableURI uuri) throws URIException { if (uuri.getRawURI().length > UsableURI.MAX_URL_LENGTH) { throw new URIException("Created (escaped) uuri > " + UsableURI.MAX_URL_LENGTH +": "+uuri.toString()); } return uuri; }
public String rewrite(String url) { try { String resolved = url; if (baseUrl != null) { resolved = UsableURIFactory.getInstance(baseUrl, url).toString(); } return converter.makeReplayURI(datespec, resolved); } catch (URIException e) { e.printStackTrace(); } return url; } }
public String rewrite(String url) { try { String resolved = url; if (baseUrl != null) { resolved = UsableURIFactory.getInstance(baseUrl, url).toString(); } return converter.makeReplayURI(datespec, resolved); } catch (URIException e) { e.printStackTrace(); } return url; } }
u = UsableURIFactory.getInstance(u).toString(); } catch (URIException e) { e.printStackTrace();
/** * @param base UURI to use as a base resolving <code>relative</code>. * @param relative Relative URI. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(UsableURI base, String relative) throws URIException { UsableURI relativeUURI = makeOne(fixup(relative, base, base.getProtocolCharset()), true, base.getProtocolCharset()); UsableURI uuri = makeOne(base, relativeUURI); if (logger.isLoggable(Level.FINE)) { logger.fine(" URI " + relative + " PRODUCT " + uuri.toString() + " CHARSET " + base.getProtocolCharset() + " BASE " + base); } return validityCheck(uuri); }
/** * @param base UURI to use as a base resolving <code>relative</code>. * @param relative Relative URI. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(UsableURI base, String relative) throws URIException { UsableURI relativeUURI = makeOne(fixup(relative, base, base.getProtocolCharset()), true, base.getProtocolCharset()); UsableURI uuri = makeOne(base, relativeUURI); if (logger.isLoggable(Level.FINE)) { logger.fine(" URI " + relative + " PRODUCT " + uuri.toString() + " CHARSET " + base.getProtocolCharset() + " BASE " + base); } return validityCheck(uuri); }
/** * @param base UURI to use as a base resolving <code>relative</code>. * @param relative Relative URI. * @return Instance of UURI. * @throws URIException */ protected UsableURI create(UsableURI base, String relative) throws URIException { UsableURI relativeUURI = makeOne(fixup(relative, base, base.getProtocolCharset()), true, base.getProtocolCharset()); UsableURI uuri = makeOne(base, relativeUURI); if (logger.isLoggable(Level.FINE)) { logger.fine(" URI " + relative + " PRODUCT " + uuri.toString() + " CHARSET " + base.getProtocolCharset() + " BASE " + base); } return validityCheck(uuri); }