/** * For a given {@link HttpHost} and {@link HttpRequest} get a URI from the * pair that I can use as an identifier KEY into my HttpCache * * @param host The host for this request * @param req the {@link HttpRequest} * @return String the extracted URI */ public String getURI(final HttpHost host, final HttpRequest req) { if (isRelativeRequest(req)) { return canonicalizeUri(String.format("%s%s", host.toString(), req.getRequestLine().getUri())); } return canonicalizeUri(req.getRequestLine().getUri()); }