HTTPCORE-107: replaced HttpVersion by ProtocolVersion wherever appropriate
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@573865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
efe4b9c9c0
commit
8dbfedcf0a
|
@ -34,7 +34,7 @@ package org.apache.http.client.methods;
|
|||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.ProtocolVersion;
|
||||
import org.apache.http.RequestLine;
|
||||
import org.apache.http.conn.ConnectionReleaseTrigger;
|
||||
import org.apache.http.message.AbstractHttpMessage;
|
||||
|
@ -62,7 +62,7 @@ abstract class HttpRequestBase extends AbstractHttpMessage
|
|||
|
||||
public abstract String getMethod();
|
||||
|
||||
public HttpVersion getHttpVersion() {
|
||||
public ProtocolVersion getProtocolVersion() {
|
||||
return HttpProtocolParams.getVersion(getParams());
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ abstract class HttpRequestBase extends AbstractHttpMessage
|
|||
|
||||
public RequestLine getRequestLine() {
|
||||
String method = getMethod();
|
||||
HttpVersion ver = getHttpVersion();
|
||||
ProtocolVersion ver = getProtocolVersion();
|
||||
URI uri = getURI();
|
||||
String uritext;
|
||||
if (uri != null) {
|
||||
|
|
|
@ -34,7 +34,6 @@ package org.apache.http.client.methods;
|
|||
import java.net.URI;
|
||||
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpVersion;
|
||||
|
||||
/**
|
||||
* Extended version of the {@link HttpRequest} interface that provides
|
||||
|
@ -51,8 +50,6 @@ import org.apache.http.HttpVersion;
|
|||
public interface HttpUriRequest extends HttpRequest {
|
||||
|
||||
String getMethod();
|
||||
|
||||
HttpVersion getHttpVersion();
|
||||
|
||||
URI getURI();
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.apache.http.HttpException;
|
|||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.ProtocolVersion;
|
||||
import org.apache.http.ProtocolException;
|
||||
import org.apache.http.auth.AuthScheme;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
|
@ -728,7 +728,7 @@ public class DefaultClientRequestDirector
|
|||
buffer.append(Integer.toString(port));
|
||||
|
||||
String authority = buffer.toString();
|
||||
HttpVersion ver = HttpProtocolParams.getVersion(params);
|
||||
ProtocolVersion ver = HttpProtocolParams.getVersion(params);
|
||||
HttpRequest req = new BasicHttpRequest
|
||||
("CONNECT", authority, ver);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.net.URI;
|
|||
import java.net.URISyntaxException;
|
||||
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.ProtocolVersion;
|
||||
import org.apache.http.RequestLine;
|
||||
import org.apache.http.client.methods.HttpUriRequest;
|
||||
import org.apache.http.message.AbstractHttpMessage;
|
||||
|
@ -62,7 +62,7 @@ class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
|||
|
||||
private URI uri;
|
||||
private String method;
|
||||
private HttpVersion version;
|
||||
private ProtocolVersion version;
|
||||
|
||||
public RequestWrapper(final HttpRequest request) throws URISyntaxException {
|
||||
super();
|
||||
|
@ -82,7 +82,7 @@ class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
|||
RequestLine requestLine = request.getRequestLine();
|
||||
this.uri = new URI(requestLine.getUri());
|
||||
this.method = requestLine.getMethod();
|
||||
this.version = request.getHttpVersion();
|
||||
this.version = request.getProtocolVersion();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
|||
this.method = method;
|
||||
}
|
||||
|
||||
public HttpVersion getHttpVersion() {
|
||||
public ProtocolVersion getProtocolVersion() {
|
||||
if (this.version != null) {
|
||||
return this.version;
|
||||
} else {
|
||||
|
@ -105,10 +105,11 @@ class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
|||
}
|
||||
}
|
||||
|
||||
public void setVersion(final HttpVersion version) {
|
||||
public void setProtocolVersion(final ProtocolVersion version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
public URI getURI() {
|
||||
return this.uri;
|
||||
}
|
||||
|
@ -119,7 +120,7 @@ class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
|||
|
||||
public RequestLine getRequestLine() {
|
||||
String method = getMethod();
|
||||
HttpVersion ver = getHttpVersion();
|
||||
ProtocolVersion ver = getProtocolVersion();
|
||||
URI uri = getURI();
|
||||
String uritext;
|
||||
if (uri != null) {
|
||||
|
|
Loading…
Reference in New Issue