"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java" between
httpcomponents-client-4.5.7-src.tar.gz and httpcomponents-client-4.5.8-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

RequestConfig.java  (httpcomponents-client-4.5.7-src):RequestConfig.java  (httpcomponents-client-4.5.8-src)
skipping to change at line 63 skipping to change at line 63
private final boolean relativeRedirectsAllowed; private final boolean relativeRedirectsAllowed;
private final boolean circularRedirectsAllowed; private final boolean circularRedirectsAllowed;
private final int maxRedirects; private final int maxRedirects;
private final boolean authenticationEnabled; private final boolean authenticationEnabled;
private final Collection<String> targetPreferredAuthSchemes; private final Collection<String> targetPreferredAuthSchemes;
private final Collection<String> proxyPreferredAuthSchemes; private final Collection<String> proxyPreferredAuthSchemes;
private final int connectionRequestTimeout; private final int connectionRequestTimeout;
private final int connectTimeout; private final int connectTimeout;
private final int socketTimeout; private final int socketTimeout;
private final boolean contentCompressionEnabled; private final boolean contentCompressionEnabled;
private final boolean normalizeUri;
/** /**
* Intended for CDI compatibility * Intended for CDI compatibility
*/ */
protected RequestConfig() { protected RequestConfig() {
this(false, null, null, false, null, false, false, false, 0, false, null , null, 0, 0, 0, true); this(false, null, null, false, null, false, false, false, 0, false, null , null, 0, 0, 0, true, true);
} }
RequestConfig( RequestConfig(
final boolean expectContinueEnabled, final boolean expectContinueEnabled,
final HttpHost proxy, final HttpHost proxy,
final InetAddress localAddress, final InetAddress localAddress,
final boolean staleConnectionCheckEnabled, final boolean staleConnectionCheckEnabled,
final String cookieSpec, final String cookieSpec,
final boolean redirectsEnabled, final boolean redirectsEnabled,
final boolean relativeRedirectsAllowed, final boolean relativeRedirectsAllowed,
final boolean circularRedirectsAllowed, final boolean circularRedirectsAllowed,
final int maxRedirects, final int maxRedirects,
final boolean authenticationEnabled, final boolean authenticationEnabled,
final Collection<String> targetPreferredAuthSchemes, final Collection<String> targetPreferredAuthSchemes,
final Collection<String> proxyPreferredAuthSchemes, final Collection<String> proxyPreferredAuthSchemes,
final int connectionRequestTimeout, final int connectionRequestTimeout,
final int connectTimeout, final int connectTimeout,
final int socketTimeout, final int socketTimeout,
final boolean contentCompressionEnabled) { final boolean contentCompressionEnabled,
final boolean normalizeUri) {
super(); super();
this.expectContinueEnabled = expectContinueEnabled; this.expectContinueEnabled = expectContinueEnabled;
this.proxy = proxy; this.proxy = proxy;
this.localAddress = localAddress; this.localAddress = localAddress;
this.staleConnectionCheckEnabled = staleConnectionCheckEnabled; this.staleConnectionCheckEnabled = staleConnectionCheckEnabled;
this.cookieSpec = cookieSpec; this.cookieSpec = cookieSpec;
this.redirectsEnabled = redirectsEnabled; this.redirectsEnabled = redirectsEnabled;
this.relativeRedirectsAllowed = relativeRedirectsAllowed; this.relativeRedirectsAllowed = relativeRedirectsAllowed;
this.circularRedirectsAllowed = circularRedirectsAllowed; this.circularRedirectsAllowed = circularRedirectsAllowed;
this.maxRedirects = maxRedirects; this.maxRedirects = maxRedirects;
this.authenticationEnabled = authenticationEnabled; this.authenticationEnabled = authenticationEnabled;
this.targetPreferredAuthSchemes = targetPreferredAuthSchemes; this.targetPreferredAuthSchemes = targetPreferredAuthSchemes;
this.proxyPreferredAuthSchemes = proxyPreferredAuthSchemes; this.proxyPreferredAuthSchemes = proxyPreferredAuthSchemes;
this.connectionRequestTimeout = connectionRequestTimeout; this.connectionRequestTimeout = connectionRequestTimeout;
this.connectTimeout = connectTimeout; this.connectTimeout = connectTimeout;
this.socketTimeout = socketTimeout; this.socketTimeout = socketTimeout;
this.contentCompressionEnabled = contentCompressionEnabled; this.contentCompressionEnabled = contentCompressionEnabled;
this.normalizeUri = normalizeUri;
} }
/** /**
* Determines whether the 'Expect: 100-Continue' handshake is enabled * Determines whether the 'Expect: 100-Continue' handshake is enabled
* for entity enclosing methods. The purpose of the 'Expect: 100-Continue' * for entity enclosing methods. The purpose of the 'Expect: 100-Continue'
* handshake is to allow a client that is sending a request message with * handshake is to allow a client that is sending a request message with
* a request body to determine if the origin server is willing to * a request body to determine if the origin server is willing to
* accept the request (based on the request headers) before the client * accept the request (based on the request headers) before the client
* sends the request body. * sends the request body.
* <p> * <p>
skipping to change at line 335 skipping to change at line 338
* <p> * <p>
* Default: {@code true} * Default: {@code true}
* </p> * </p>
* *
* @since 4.5 * @since 4.5
*/ */
public boolean isContentCompressionEnabled() { public boolean isContentCompressionEnabled() {
return contentCompressionEnabled; return contentCompressionEnabled;
} }
/**
* Determines whether client should normalize URIs in requests or not.
* <p>
* Default: {@code true}
* </p>
*
* @since 4.5.8
*/
public boolean isNormalizeUri() {
return normalizeUri;
}
@Override @Override
protected RequestConfig clone() throws CloneNotSupportedException { protected RequestConfig clone() throws CloneNotSupportedException {
return (RequestConfig) super.clone(); return (RequestConfig) super.clone();
} }
@Override @Override
public String toString() { public String toString() {
final StringBuilder builder = new StringBuilder(); final StringBuilder builder = new StringBuilder();
builder.append("["); builder.append("[");
builder.append("expectContinueEnabled=").append(expectContinueEnabled); builder.append("expectContinueEnabled=").append(expectContinueEnabled);
skipping to change at line 359 skipping to change at line 374
builder.append(", relativeRedirectsAllowed=").append(relativeRedirectsAl lowed); builder.append(", relativeRedirectsAllowed=").append(relativeRedirectsAl lowed);
builder.append(", maxRedirects=").append(maxRedirects); builder.append(", maxRedirects=").append(maxRedirects);
builder.append(", circularRedirectsAllowed=").append(circularRedirectsAl lowed); builder.append(", circularRedirectsAllowed=").append(circularRedirectsAl lowed);
builder.append(", authenticationEnabled=").append(authenticationEnabled) ; builder.append(", authenticationEnabled=").append(authenticationEnabled) ;
builder.append(", targetPreferredAuthSchemes=").append(targetPreferredAu thSchemes); builder.append(", targetPreferredAuthSchemes=").append(targetPreferredAu thSchemes);
builder.append(", proxyPreferredAuthSchemes=").append(proxyPreferredAuth Schemes); builder.append(", proxyPreferredAuthSchemes=").append(proxyPreferredAuth Schemes);
builder.append(", connectionRequestTimeout=").append(connectionRequestTi meout); builder.append(", connectionRequestTimeout=").append(connectionRequestTi meout);
builder.append(", connectTimeout=").append(connectTimeout); builder.append(", connectTimeout=").append(connectTimeout);
builder.append(", socketTimeout=").append(socketTimeout); builder.append(", socketTimeout=").append(socketTimeout);
builder.append(", contentCompressionEnabled=").append(contentCompression Enabled); builder.append(", contentCompressionEnabled=").append(contentCompression Enabled);
builder.append(", normalizeUri=").append(normalizeUri);
builder.append("]"); builder.append("]");
return builder.toString(); return builder.toString();
} }
public static RequestConfig.Builder custom() { public static RequestConfig.Builder custom() {
return new Builder(); return new Builder();
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static RequestConfig.Builder copy(final RequestConfig config) { public static RequestConfig.Builder copy(final RequestConfig config) {
skipping to change at line 407 skipping to change at line 423
private boolean relativeRedirectsAllowed; private boolean relativeRedirectsAllowed;
private boolean circularRedirectsAllowed; private boolean circularRedirectsAllowed;
private int maxRedirects; private int maxRedirects;
private boolean authenticationEnabled; private boolean authenticationEnabled;
private Collection<String> targetPreferredAuthSchemes; private Collection<String> targetPreferredAuthSchemes;
private Collection<String> proxyPreferredAuthSchemes; private Collection<String> proxyPreferredAuthSchemes;
private int connectionRequestTimeout; private int connectionRequestTimeout;
private int connectTimeout; private int connectTimeout;
private int socketTimeout; private int socketTimeout;
private boolean contentCompressionEnabled; private boolean contentCompressionEnabled;
private boolean normalizeUri;
Builder() { Builder() {
super(); super();
this.staleConnectionCheckEnabled = false; this.staleConnectionCheckEnabled = false;
this.redirectsEnabled = true; this.redirectsEnabled = true;
this.maxRedirects = 50; this.maxRedirects = 50;
this.relativeRedirectsAllowed = true; this.relativeRedirectsAllowed = true;
this.authenticationEnabled = true; this.authenticationEnabled = true;
this.connectionRequestTimeout = -1; this.connectionRequestTimeout = -1;
this.connectTimeout = -1; this.connectTimeout = -1;
this.socketTimeout = -1; this.socketTimeout = -1;
this.contentCompressionEnabled = true; this.contentCompressionEnabled = true;
this.normalizeUri = true;
} }
public Builder setExpectContinueEnabled(final boolean expectContinueEnab led) { public Builder setExpectContinueEnabled(final boolean expectContinueEnab led) {
this.expectContinueEnabled = expectContinueEnabled; this.expectContinueEnabled = expectContinueEnabled;
return this; return this;
} }
public Builder setProxy(final HttpHost proxy) { public Builder setProxy(final HttpHost proxy) {
this.proxy = proxy; this.proxy = proxy;
return this; return this;
skipping to change at line 516 skipping to change at line 534
public Builder setDecompressionEnabled(final boolean decompressionEnable d) { public Builder setDecompressionEnabled(final boolean decompressionEnable d) {
this.contentCompressionEnabled = decompressionEnabled; this.contentCompressionEnabled = decompressionEnabled;
return this; return this;
} }
public Builder setContentCompressionEnabled(final boolean contentCompres sionEnabled) { public Builder setContentCompressionEnabled(final boolean contentCompres sionEnabled) {
this.contentCompressionEnabled = contentCompressionEnabled; this.contentCompressionEnabled = contentCompressionEnabled;
return this; return this;
} }
public Builder setNormalizeUri(final boolean normalizeUri) {
this.normalizeUri = normalizeUri;
return this;
}
public RequestConfig build() { public RequestConfig build() {
return new RequestConfig( return new RequestConfig(
expectContinueEnabled, expectContinueEnabled,
proxy, proxy,
localAddress, localAddress,
staleConnectionCheckEnabled, staleConnectionCheckEnabled,
cookieSpec, cookieSpec,
redirectsEnabled, redirectsEnabled,
relativeRedirectsAllowed, relativeRedirectsAllowed,
circularRedirectsAllowed, circularRedirectsAllowed,
maxRedirects, maxRedirects,
authenticationEnabled, authenticationEnabled,
targetPreferredAuthSchemes, targetPreferredAuthSchemes,
proxyPreferredAuthSchemes, proxyPreferredAuthSchemes,
connectionRequestTimeout, connectionRequestTimeout,
connectTimeout, connectTimeout,
socketTimeout, socketTimeout,
contentCompressionEnabled); contentCompressionEnabled,
normalizeUri);
} }
} }
} }
 End of changes. 10 change blocks. 
3 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)