Revert accidental changes made in r980937
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045364 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae8764760b
commit
0b5e40c11d
|
@ -632,16 +632,10 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
|
|
||||||
URI requestURI = request.getURI();
|
URI requestURI = request.getURI();
|
||||||
if (requestURI.isAbsolute()) {
|
if (requestURI.isAbsolute()) {
|
||||||
String ssp = requestURI.getSchemeSpecificPart();
|
String host = requestURI.getHost();
|
||||||
ssp = ssp.substring(2, ssp.length()); //remove "//" prefix
|
|
||||||
int end = ssp.indexOf(':') > 0 ? ssp.indexOf(':') :
|
|
||||||
ssp.indexOf('/') > 0 ? ssp.indexOf('/') :
|
|
||||||
ssp.indexOf('?') > 0 ? ssp.indexOf('?') : ssp.length();
|
|
||||||
String host = ssp.substring(0, end);
|
|
||||||
|
|
||||||
int port = requestURI.getPort();
|
int port = requestURI.getPort();
|
||||||
String scheme = requestURI.getScheme();
|
String scheme = requestURI.getScheme();
|
||||||
if (host == null || "".equals(host)) {
|
if (host == null) {
|
||||||
throw new ClientProtocolException(
|
throw new ClientProtocolException(
|
||||||
"URI does not specify a valid host name: " + requestURI);
|
"URI does not specify a valid host name: " + requestURI);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue