uri = request.getUri(); } catch (final URISyntaxException ex) { throw new ProtocolException(ex.getMessage(), ex);
private static HttpHost determineTarget(final ClassicHttpRequest request) throws ClientProtocolException { // A null target may be acceptable if there is a default target. // Otherwise, the null target is detected in the director. HttpHost target = null; URI requestURI = null; try { requestURI = request.getUri(); } catch (final URISyntaxException ignore) { } if (requestURI != null && requestURI.isAbsolute()) { target = URIUtils.extractHost(requestURI); if (target == null) { throw new ClientProtocolException("URI does not specify a valid host name: " + requestURI); } } return target; }
final Map<String, String> expectedQuery = (Map<String, String>) requestExpectations.get(QUERY); if (expectedQuery != null) { final URI uri = request.getUri(); final List<NameValuePair> actualParams = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8); final Map<String, String> actualParamsMap = new HashMap<>();
final Map<String, String> expectedQuery = (Map<String, String>) requestExpectations.get(QUERY); if (expectedQuery != null) { final URI uri = request.getUri(); final List<NameValuePair> actualParams = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8); final Map<String, String> actualParamsMap = new HashMap<>();
uri = request.getUri(); } catch (final URISyntaxException ignore) {
if (proxy != null && !route.isTunnelled()) { try { URI uri = request.getUri(); if (!uri.isAbsolute()) { uri = URIUtils.rewriteURI(uri, target, true);