Browse Source

KERNEL-9835 fix: Apache HttpClient 安全漏洞, 升级到4.5.13

feature/x
Dylan.Liu 3 years ago
parent
commit
9adf72f72e
  1. 8
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/ContentResponseHandler.java
  2. 9
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Executor.java
  3. 8
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalByteArrayEntity.java
  4. 14
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalFileEntity.java
  5. 26
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalInputStreamEntity.java
  6. 10
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Request.java
  7. 5
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/CurrentWindowsCredentials.java
  8. 4
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsCredentialsProvider.java
  9. 31
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
  10. 6
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/client/WinHttpClients.java
  11. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParamBean.java
  12. 12
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParams.java
  13. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/AuthenticationHandler.java
  14. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/RedirectHandler.java
  15. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/AuthPolicy.java
  16. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/ClientParamBean.java
  17. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/CookiePolicy.java
  18. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/HttpClientParams.java
  19. 52
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ClientContext.java
  20. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestAuthenticationBase.java
  21. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestProxyAuthentication.java
  22. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestTargetAuthentication.java
  23. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ResponseAuthCache.java
  24. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicEofSensorWatcher.java
  25. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicManagedEntity.java
  26. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ClientConnectionManagerFactory.java
  27. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ClientConnectionOperator.java
  28. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/MultihomePlainSocketFactory.java
  29. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/OperatedClientConnection.java
  30. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnConnectionParamBean.java
  31. 15
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParams.java
  32. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRoute.java
  33. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRouteBean.java
  34. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParamBean.java
  35. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParams.java
  36. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/scheme/PlainSocketFactory.java
  37. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContexts.java
  38. 11
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLSocketFactory.java
  39. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/cookie/params/CookieSpecParamBean.java
  40. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/SpnegoTokenGenerator.java
  41. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractAuthenticationHandler.java
  42. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractHttpClient.java
  43. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
  44. 9
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ClientParamsStack.java
  45. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/CloseableHttpResponseProxy.java
  46. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ContentEncodingHttpClient.java
  47. 79
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultHttpClient.java
  48. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java
  49. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectHandler.java
  50. 76
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRequestDirector.java
  51. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java
  52. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/RoutedRequest.java
  53. 68
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/SystemDefaultHttpClient.java
  54. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractClientConnAdapter.java
  55. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPoolEntry.java
  56. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPooledConnAdapter.java
  57. 14
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/BasicClientConnectionManager.java
  58. 16
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnection.java
  59. 22
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnectionOperator.java
  60. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
  61. 11
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultResponseParser.java
  62. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpConnPool.java
  63. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpPoolEntry.java
  64. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/IdleConnectionHandler.java
  65. 35
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
  66. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java
  67. 31
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/PoolingClientConnectionManager.java
  68. 12
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
  69. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SchemeRegistryFactory.java
  70. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SingleClientConnManager.java
  71. 14
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
  72. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java
  73. 20
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
  74. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/PoolEntryRequest.java
  75. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java
  76. 16
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
  77. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpec.java
  78. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpecFactory.java
  79. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpec.java
  80. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
  81. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatVersionAttributeHandler.java
  82. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/IgnoreSpecFactory.java
  83. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
  84. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/PublicSuffixFilter.java
  85. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2109SpecFactory.java
  86. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2965SpecFactory.java
  87. 3
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScheme.java
  88. 6
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthSchemeRegistry.java
  89. 6
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScope.java
  90. 9
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthState.java
  91. 19
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/params/AuthPNames.java
  92. 2
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/CookieStore.java
  93. 10
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/HttpClient.java
  94. 13
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/HttpResponseException.java
  95. 5
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/config/AuthSchemes.java
  96. 52
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/config/RequestConfig.java
  97. 15
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DecompressingEntity.java
  98. 15
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DeflateDecompressingEntity.java
  99. 63
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DeflateInputStreamFactory.java
  100. 131
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/EntityBuilder.java
  101. Some files were not shown because too many files have changed in this diff Show More

8
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/ContentResponseHandler.java

@ -28,19 +28,17 @@ package com.fr.third.org.apache.http.client.fluent;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.client.ResponseHandler;
import com.fr.third.org.apache.http.entity.ContentType; import com.fr.third.org.apache.http.entity.ContentType;
import com.fr.third.org.apache.http.impl.client.AbstractResponseHandler; import com.fr.third.org.apache.http.impl.client.AbstractResponseHandler;
import com.fr.third.org.apache.http.util.EntityUtils; import com.fr.third.org.apache.http.util.EntityUtils;
/** /**
* {@link ResponseHandler} implementation that converts * {@link com.fr.third.org.apache.http.client.ResponseHandler} implementation that converts
* {@link HttpResponse} messages to {@link Content} * {@link com.fr.third.org.apache.http.HttpResponse} messages to {@link com.fr.third.org.apache.http.client.fluent.Content}
* instances. * instances.
* *
* @see Content * @see com.fr.third.org.apache.http.client.fluent.Content
* *
* @since 4.4 * @since 4.4
*/ */

9
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Executor.java

@ -26,13 +26,12 @@
*/ */
package com.fr.third.org.apache.http.client.fluent; package com.fr.third.org.apache.http.client.fluent;
import javax.net.ssl.SSLContext;
import java.io.IOException; import java.io.IOException;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthScope; import com.fr.third.org.apache.http.auth.AuthScope;
@ -45,11 +44,9 @@ import com.fr.third.org.apache.http.client.ClientProtocolException;
import com.fr.third.org.apache.http.client.CookieStore; import com.fr.third.org.apache.http.client.CookieStore;
import com.fr.third.org.apache.http.client.CredentialsProvider; import com.fr.third.org.apache.http.client.CredentialsProvider;
import com.fr.third.org.apache.http.client.HttpClient; import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.ResponseHandler;
import com.fr.third.org.apache.http.client.protocol.HttpClientContext; import com.fr.third.org.apache.http.client.protocol.HttpClientContext;
import com.fr.third.org.apache.http.config.Registry; import com.fr.third.org.apache.http.config.Registry;
import com.fr.third.org.apache.http.config.RegistryBuilder; import com.fr.third.org.apache.http.config.RegistryBuilder;
import com.fr.third.org.apache.http.conn.scheme.Scheme;
import com.fr.third.org.apache.http.conn.socket.ConnectionSocketFactory; import com.fr.third.org.apache.http.conn.socket.ConnectionSocketFactory;
import com.fr.third.org.apache.http.conn.socket.LayeredConnectionSocketFactory; import com.fr.third.org.apache.http.conn.socket.LayeredConnectionSocketFactory;
import com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory; import com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory;
@ -246,7 +243,7 @@ public class Executor {
* or discarded using {@link Response#discardContent()}, otherwise the * or discarded using {@link Response#discardContent()}, otherwise the
* connection used for the request might not be released to the pool. * connection used for the request might not be released to the pool.
* *
* @see Response#handleResponse(ResponseHandler) * @see Response#handleResponse(org.apache.http.client.ResponseHandler)
* @see Response#discardContent() * @see Response#discardContent()
*/ */
public Response execute( public Response execute(
@ -268,7 +265,7 @@ public class Executor {
* @deprecated (4.3) do not use. * @deprecated (4.3) do not use.
*/ */
@Deprecated @Deprecated
public static void registerScheme(final Scheme scheme) { public static void registerScheme(final com.fr.third.org.apache.http.conn.scheme.Scheme scheme) {
} }
/** /**

8
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalByteArrayEntity.java

@ -91,10 +91,10 @@ class InternalByteArrayEntity extends AbstractHttpEntity implements Cloneable {
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
Args.notNull(outstream, "Output stream"); Args.notNull(outStream, "Output stream");
outstream.write(this.b, this.off, this.len); outStream.write(this.b, this.off, this.len);
outstream.flush(); outStream.flush();
} }
@Override @Override

14
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalFileEntity.java

@ -65,18 +65,18 @@ class InternalFileEntity extends AbstractHttpEntity implements Cloneable {
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
Args.notNull(outstream, "Output stream"); Args.notNull(outStream, "Output stream");
final InputStream instream = new FileInputStream(this.file); final InputStream inStream = new FileInputStream(this.file);
try { try {
final byte[] tmp = new byte[4096]; final byte[] tmp = new byte[4096];
int l; int l;
while ((l = instream.read(tmp)) != -1) { while ((l = inStream.read(tmp)) != -1) {
outstream.write(tmp, 0, l); outStream.write(tmp, 0, l);
} }
outstream.flush(); outStream.flush();
} finally { } finally {
instream.close(); inStream.close();
} }
} }

26
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalInputStreamEntity.java

@ -40,9 +40,9 @@ class InternalInputStreamEntity extends AbstractHttpEntity {
private final InputStream content; private final InputStream content;
private final long length; private final long length;
public InternalInputStreamEntity(final InputStream instream, final long length, final ContentType contentType) { public InternalInputStreamEntity(final InputStream inputStream, final long length, final ContentType contentType) {
super(); super();
this.content = Args.notNull(instream, "Source input stream"); this.content = Args.notNull(inputStream, "Source input stream");
this.length = length; this.length = length;
if (contentType != null) { if (contentType != null) {
setContentType(contentType.toString()); setContentType(contentType.toString());
@ -65,31 +65,31 @@ class InternalInputStreamEntity extends AbstractHttpEntity {
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
Args.notNull(outstream, "Output stream"); Args.notNull(outStream, "Output stream");
final InputStream instream = this.content; final InputStream inStream = this.content;
try { try {
final byte[] buffer = new byte[4096]; final byte[] buffer = new byte[4096];
int l; int readLen;
if (this.length < 0) { if (this.length < 0) {
// consume until EOF // consume until EOF
while ((l = instream.read(buffer)) != -1) { while ((readLen = inStream.read(buffer)) != -1) {
outstream.write(buffer, 0, l); outStream.write(buffer, 0, readLen);
} }
} else { } else {
// consume no more than length // consume no more than length
long remaining = this.length; long remaining = this.length;
while (remaining > 0) { while (remaining > 0) {
l = instream.read(buffer, 0, (int)Math.min(4096, remaining)); readLen = inStream.read(buffer, 0, (int)Math.min(4096, remaining));
if (l == -1) { if (readLen == -1) {
break; break;
} }
outstream.write(buffer, 0, l); outStream.write(buffer, 0, readLen);
remaining -= l; remaining -= readLen;
} }
} }
} finally { } finally {
instream.close(); inStream.close();
} }
} }

10
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Request.java

@ -353,7 +353,7 @@ public class Request {
public Request bodyForm(final Iterable <? extends NameValuePair> formParams, final Charset charset) { public Request bodyForm(final Iterable <? extends NameValuePair> formParams, final Charset charset) {
final List<NameValuePair> paramList = new ArrayList<NameValuePair>(); final List<NameValuePair> paramList = new ArrayList<NameValuePair>();
for (NameValuePair param : formParams) { for (final NameValuePair param : formParams) {
paramList.add(param); paramList.add(param);
} }
final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset); final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset);
@ -401,12 +401,12 @@ public class Request {
return body(new InternalByteArrayEntity(b, off, len, contentType)); return body(new InternalByteArrayEntity(b, off, len, contentType));
} }
public Request bodyStream(final InputStream instream) { public Request bodyStream(final InputStream inStream) {
return body(new InternalInputStreamEntity(instream, -1, null)); return body(new InternalInputStreamEntity(inStream, -1, null));
} }
public Request bodyStream(final InputStream instream, final ContentType contentType) { public Request bodyStream(final InputStream inStream, final ContentType contentType) {
return body(new InternalInputStreamEntity(instream, -1, contentType)); return body(new InternalInputStreamEntity(inStream, -1, contentType));
} }
@Override @Override

5
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/CurrentWindowsCredentials.java

@ -30,13 +30,12 @@ package com.fr.third.org.apache.http.impl.auth.win;
import java.io.Serializable; import java.io.Serializable;
import java.security.Principal; import java.security.Principal;
import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
import com.sun.jna.platform.win32.Secur32Util;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.Credentials; import com.fr.third.org.apache.http.auth.Credentials;
import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
import com.sun.jna.platform.win32.Secur32Util;
/** /**
* Returns the current Windows user credentials * Returns the current Windows user credentials
* <p> * <p>

4
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsCredentialsProvider.java

@ -35,8 +35,8 @@ import com.fr.third.org.apache.http.client.config.AuthSchemes;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* {@link CredentialsProvider} implementation that always returns * {@link com.fr.third.org.apache.http.client.CredentialsProvider} implementation that always returns
* {@link CurrentWindowsCredentials} instance to NTLM * {@link com.fr.third.org.apache.http.impl.auth.win.CurrentWindowsCredentials} instance to NTLM
* and SPNego authentication challenges. * and SPNego authentication challenges.
* <p> * <p>
* EXPERIMENTAL * EXPERIMENTAL

31
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java

@ -26,6 +26,15 @@
*/ */
package com.fr.third.org.apache.http.impl.auth.win; package com.fr.third.org.apache.http.impl.auth.win;
import com.sun.jna.platform.win32.Secur32;
import com.sun.jna.platform.win32.Sspi;
import com.sun.jna.platform.win32.Sspi.CredHandle;
import com.sun.jna.platform.win32.Sspi.CtxtHandle;
import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
import com.sun.jna.platform.win32.Sspi.TimeStamp;
import com.sun.jna.platform.win32.Win32Exception;
import com.sun.jna.platform.win32.WinError;
import com.sun.jna.ptr.IntByReference;
import com.fr.third.org.apache.commons.codec.binary.Base64; import com.fr.third.org.apache.commons.codec.binary.Base64;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -45,16 +54,6 @@ import com.fr.third.org.apache.http.message.BufferedHeader;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.CharArrayBuffer; import com.fr.third.org.apache.http.util.CharArrayBuffer;
import com.sun.jna.platform.win32.Secur32;
import com.sun.jna.platform.win32.Sspi;
import com.sun.jna.platform.win32.Sspi.CredHandle;
import com.sun.jna.platform.win32.Sspi.CtxtHandle;
import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
import com.sun.jna.platform.win32.Sspi.TimeStamp;
import com.sun.jna.platform.win32.Win32Exception;
import com.sun.jna.platform.win32.WinError;
import com.sun.jna.ptr.IntByReference;
/** /**
* Auth scheme that makes use of JNA to implement Negotiate and NTLM on Windows Platforms. * Auth scheme that makes use of JNA to implement Negotiate and NTLM on Windows Platforms.
* <p> * <p>
@ -241,6 +240,15 @@ public class WindowsNegotiateScheme extends AuthSchemeBase {
final String spn; final String spn;
if (this.servicePrincipalName != null) { if (this.servicePrincipalName != null) {
spn = this.servicePrincipalName; spn = this.servicePrincipalName;
} else if(isProxy()){
final HttpClientContext clientContext = HttpClientContext.adapt(context);
final RouteInfo route = clientContext.getHttpRoute();
if (route != null) {
spn = "HTTP/" + route.getProxyHost().getHostName();
} else {
// Should not happen
spn = null;
}
} else { } else {
final HttpClientContext clientContext = HttpClientContext.adapt(context); final HttpClientContext clientContext = HttpClientContext.adapt(context);
final HttpHost target = clientContext.getTargetHost(); final HttpHost target = clientContext.getTargetHost();
@ -296,6 +304,9 @@ public class WindowsNegotiateScheme extends AuthSchemeBase {
return !continueNeeded; return !continueNeeded;
} }
/**
* @deprecated Use {@link #authenticate(Credentials, HttpRequest, HttpContext)}
*/
@Override @Override
@Deprecated @Deprecated
public Header authenticate( public Header authenticate(

6
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/client/WinHttpClients.java

@ -28,6 +28,7 @@ package com.fr.third.org.apache.http.impl.client;
import java.util.Locale; import java.util.Locale;
import com.sun.jna.platform.win32.Sspi;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider; import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.client.CredentialsProvider; import com.fr.third.org.apache.http.client.CredentialsProvider;
import com.fr.third.org.apache.http.client.config.AuthSchemes; import com.fr.third.org.apache.http.client.config.AuthSchemes;
@ -35,15 +36,10 @@ import com.fr.third.org.apache.http.config.Registry;
import com.fr.third.org.apache.http.config.RegistryBuilder; import com.fr.third.org.apache.http.config.RegistryBuilder;
import com.fr.third.org.apache.http.impl.auth.BasicSchemeFactory; import com.fr.third.org.apache.http.impl.auth.BasicSchemeFactory;
import com.fr.third.org.apache.http.impl.auth.DigestSchemeFactory; import com.fr.third.org.apache.http.impl.auth.DigestSchemeFactory;
import com.fr.third.org.apache.http.impl.client.CloseableHttpClient;
import com.fr.third.org.apache.http.impl.client.HttpClientBuilder;
import com.fr.third.org.apache.http.impl.client.SystemDefaultCredentialsProvider;
import com.fr.third.org.apache.http.impl.auth.win.WindowsCredentialsProvider; import com.fr.third.org.apache.http.impl.auth.win.WindowsCredentialsProvider;
import com.fr.third.org.apache.http.impl.auth.win.WindowsNTLMSchemeFactory; import com.fr.third.org.apache.http.impl.auth.win.WindowsNTLMSchemeFactory;
import com.fr.third.org.apache.http.impl.auth.win.WindowsNegotiateSchemeFactory; import com.fr.third.org.apache.http.impl.auth.win.WindowsNegotiateSchemeFactory;
import com.sun.jna.platform.win32.Sspi;
/** /**
* Factory methods for {@link CloseableHttpClient} instances configured to use integrated * Factory methods for {@link CloseableHttpClient} instances configured to use integrated
* Windows authentication by default. * Windows authentication by default.

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParamBean.java

@ -27,8 +27,6 @@
package com.fr.third.org.apache.http.auth.params; package com.fr.third.org.apache.http.auth.params;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -39,9 +37,9 @@ import com.fr.third.org.apache.http.params.HttpParams;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}
* and constructor parameters of * and constructor parameters of
* {@link AuthSchemeProvider}s. * {@link com.fr.third.org.apache.http.auth.AuthSchemeProvider}s.
*/ */
@Deprecated @Deprecated
public class AuthParamBean extends HttpAbstractParamBean { public class AuthParamBean extends HttpAbstractParamBean {

12
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParams.java

@ -29,10 +29,6 @@ package com.fr.third.org.apache.http.auth.params;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HTTP; import com.fr.third.org.apache.http.protocol.HTTP;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -43,9 +39,9 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}
* and constructor parameters of * and constructor parameters of
* {@link AuthSchemeProvider}s. * {@link com.fr.third.org.apache.http.auth.AuthSchemeProvider}s.
*/ */
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
@ -57,7 +53,7 @@ public final class AuthParams {
/** /**
* Obtains the charset for encoding * Obtains the charset for encoding
* {@link Credentials}.If not configured, * {@link com.fr.third.org.apache.http.auth.Credentials}.If not configured,
* {@link HTTP#DEFAULT_PROTOCOL_CHARSET}is used instead. * {@link HTTP#DEFAULT_PROTOCOL_CHARSET}is used instead.
* *
* @return The charset * @return The charset
@ -75,7 +71,7 @@ public final class AuthParams {
/** /**
* Sets the charset to be used when encoding * Sets the charset to be used when encoding
* {@link Credentials}. * {@link com.fr.third.org.apache.http.auth.Credentials}.
* *
* @param charset The charset * @param charset The charset
*/ */

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/AuthenticationHandler.java

@ -34,7 +34,6 @@ import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthenticationException; import com.fr.third.org.apache.http.auth.AuthenticationException;
import com.fr.third.org.apache.http.auth.MalformedChallengeException; import com.fr.third.org.apache.http.auth.MalformedChallengeException;
import com.fr.third.org.apache.http.client.AuthenticationStrategy;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/RedirectHandler.java

@ -31,7 +31,6 @@ import java.net.URI;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.client.RedirectStrategy;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/AuthPolicy.java

@ -27,14 +27,12 @@
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.client.config.AuthSchemes;
/** /**
* Standard authentication schemes supported by HttpClient. * Standard authentication schemes supported by HttpClient.
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link AuthSchemes}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.AuthSchemes}.
*/ */
@Deprecated @Deprecated
public final class AuthPolicy { public final class AuthPolicy {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/ClientParamBean.java

@ -31,8 +31,6 @@ import java.util.Collection;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.params.ClientPNames;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -43,7 +41,7 @@ import com.fr.third.org.apache.http.params.HttpParams;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}.
*/ */
@Deprecated @Deprecated
public class ClientParamBean extends HttpAbstractParamBean { public class ClientParamBean extends HttpAbstractParamBean {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/CookiePolicy.java

@ -27,14 +27,12 @@
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.client.config.CookieSpecs;
/** /**
* Standard cookie specifications supported by HttpClient. * Standard cookie specifications supported by HttpClient.
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link CookieSpecs}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.CookieSpecs}.
*/ */
@Deprecated @Deprecated
public final class CookiePolicy { public final class CookiePolicy {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/HttpClientParams.java

@ -26,7 +26,6 @@
*/ */
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -36,7 +35,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}
*/ */
@Deprecated @Deprecated
public class HttpClientParams { public class HttpClientParams {

52
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ClientContext.java

@ -27,23 +27,8 @@
package com.fr.third.org.apache.http.client.protocol; package com.fr.third.org.apache.http.client.protocol;
import com.fr.third.org.apache.http.auth.AuthSchemeRegistry;
import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.client.AuthCache;
import com.fr.third.org.apache.http.client.CookieStore;
import com.fr.third.org.apache.http.client.CredentialsProvider;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.protocol.HttpClientContext;
import com.fr.third.org.apache.http.config.Lookup;
import com.fr.third.org.apache.http.conn.routing.RouteInfo;
import com.fr.third.org.apache.http.conn.scheme.Scheme;
import com.fr.third.org.apache.http.cookie.CookieOrigin;
import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecRegistry;
import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link HttpContext} attribute names for * {@link com.fr.third.org.apache.http.protocol.HttpContext} attribute names for
* client side HTTP protocol processing. * client side HTTP protocol processing.
* *
* @since 4.0 * @since 4.0
@ -54,7 +39,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
public interface ClientContext { public interface ClientContext {
/** /**
* Attribute name of a {@link RouteInfo} * Attribute name of a {@link com.fr.third.org.apache.http.conn.routing.RouteInfo}
* object that represents the actual connection route. * object that represents the actual connection route.
* *
* @since 4.3 * @since 4.3
@ -62,82 +47,77 @@ public interface ClientContext {
public static final String ROUTE = "http.route"; public static final String ROUTE = "http.route";
/** /**
* Attribute name of a {@link Scheme} * Attribute name of a {@link com.fr.third.org.apache.http.conn.scheme.Scheme}
* object that represents the actual protocol scheme registry. * object that represents the actual protocol scheme registry.
*/ */
@Deprecated
public static final String SCHEME_REGISTRY = "http.scheme-registry"; public static final String SCHEME_REGISTRY = "http.scheme-registry";
/** /**
* Attribute name of a {@link Lookup} object that represents * Attribute name of a {@link com.fr.third.org.apache.http.config.Lookup} object that represents
* the actual {@link CookieSpecRegistry} registry. * the actual {@link com.fr.third.org.apache.http.cookie.CookieSpecRegistry} registry.
*/ */
public static final String COOKIESPEC_REGISTRY = "http.cookiespec-registry"; public static final String COOKIESPEC_REGISTRY = "http.cookiespec-registry";
/** /**
* Attribute name of a {@link CookieSpec} * Attribute name of a {@link com.fr.third.org.apache.http.cookie.CookieSpec}
* object that represents the actual cookie specification. * object that represents the actual cookie specification.
*/ */
public static final String COOKIE_SPEC = "http.cookie-spec"; public static final String COOKIE_SPEC = "http.cookie-spec";
/** /**
* Attribute name of a {@link CookieOrigin} * Attribute name of a {@link com.fr.third.org.apache.http.cookie.CookieOrigin}
* object that represents the actual details of the origin server. * object that represents the actual details of the origin server.
*/ */
public static final String COOKIE_ORIGIN = "http.cookie-origin"; public static final String COOKIE_ORIGIN = "http.cookie-origin";
/** /**
* Attribute name of a {@link CookieStore} * Attribute name of a {@link com.fr.third.org.apache.http.client.CookieStore}
* object that represents the actual cookie store. * object that represents the actual cookie store.
*/ */
public static final String COOKIE_STORE = "http.cookie-store"; public static final String COOKIE_STORE = "http.cookie-store";
/** /**
* Attribute name of a {@link CredentialsProvider} * Attribute name of a {@link com.fr.third.org.apache.http.client.CredentialsProvider}
* object that represents the actual credentials provider. * object that represents the actual credentials provider.
*/ */
public static final String CREDS_PROVIDER = "http.auth.credentials-provider"; public static final String CREDS_PROVIDER = "http.auth.credentials-provider";
/** /**
* Attribute name of a {@link AuthCache} object * Attribute name of a {@link com.fr.third.org.apache.http.client.AuthCache} object
* that represents the auth scheme cache. * that represents the auth scheme cache.
*/ */
public static final String AUTH_CACHE = "http.auth.auth-cache"; public static final String AUTH_CACHE = "http.auth.auth-cache";
/** /**
* Attribute name of a {@link AuthState} * Attribute name of a {@link com.fr.third.org.apache.http.auth.AuthState}
* object that represents the actual target authentication state. * object that represents the actual target authentication state.
*/ */
public static final String TARGET_AUTH_STATE = "http.auth.target-scope"; public static final String TARGET_AUTH_STATE = "http.auth.target-scope";
/** /**
* Attribute name of a {@link AuthState} * Attribute name of a {@link com.fr.third.org.apache.http.auth.AuthState}
* object that represents the actual proxy authentication state. * object that represents the actual proxy authentication state.
*/ */
public static final String PROXY_AUTH_STATE = "http.auth.proxy-scope"; public static final String PROXY_AUTH_STATE = "http.auth.proxy-scope";
/**
* @deprecated (4.1) do not use
*/
@Deprecated
public static final String AUTH_SCHEME_PREF = "http.auth.scheme-pref"; public static final String AUTH_SCHEME_PREF = "http.auth.scheme-pref";
/** /**
* Attribute name of a {@link java.lang.Object} object that represents * Attribute name of a {@link Object} object that represents
* the actual user identity such as user {@link java.security.Principal}. * the actual user identity such as user {@link java.security.Principal}.
*/ */
public static final String USER_TOKEN = "http.user-token"; public static final String USER_TOKEN = "http.user-token";
/** /**
* Attribute name of a {@link Lookup} object that represents * Attribute name of a {@link com.fr.third.org.apache.http.config.Lookup} object that represents
* the actual {@link AuthSchemeRegistry} registry. * the actual {@link com.fr.third.org.apache.http.auth.AuthSchemeRegistry} registry.
*/ */
public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry"; public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry";
public static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry"; public static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
/** /**
* Attribute name of a {@link RequestConfig} object that * Attribute name of a {@link com.fr.third.org.apache.http.client.config.RequestConfig} object that
* represents the actual request configuration. * represents the actual request configuration.
* *
* @since 4.3 * @since 4.3

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestAuthenticationBase.java

@ -43,6 +43,9 @@ import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.Asserts; import com.fr.third.org.apache.http.util.Asserts;
/**
* @deprecated Do not use.
*/
@Deprecated @Deprecated
abstract class RequestAuthenticationBase implements HttpRequestInterceptor { abstract class RequestAuthenticationBase implements HttpRequestInterceptor {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestProxyAuthentication.java

@ -37,7 +37,6 @@ import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.conn.HttpRoutedConnection; import com.fr.third.org.apache.http.conn.HttpRoutedConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.impl.auth.HttpAuthenticator;
import com.fr.third.org.apache.http.protocol.ExecutionContext; import com.fr.third.org.apache.http.protocol.ExecutionContext;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -48,7 +47,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link HttpAuthenticator}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.impl.auth.HttpAuthenticator}.
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestTargetAuthentication.java

@ -35,7 +35,6 @@ import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.impl.auth.HttpAuthenticator;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -45,7 +44,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link HttpAuthenticator}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.impl.auth.HttpAuthenticator}.
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ResponseAuthCache.java

@ -29,7 +29,6 @@ package com.fr.third.org.apache.http.client.protocol;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.client.AuthenticationStrategy;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
@ -57,7 +56,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.1 * @since 4.1
* *
* @deprecated (4.2) use {@link AuthenticationStrategy} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.client.AuthenticationStrategy}
*/ */
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicEofSensorWatcher.java

@ -29,8 +29,6 @@ package com.fr.third.org.apache.http.conn;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import com.fr.third.org.apache.http.conn.EofSensorWatcher;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicManagedEntity.java

@ -32,10 +32,6 @@ import java.io.OutputStream;
import java.net.SocketException; import java.net.SocketException;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.conn.ConnectionReleaseTrigger;
import com.fr.third.org.apache.http.conn.EofSensorInputStream;
import com.fr.third.org.apache.http.conn.EofSensorWatcher;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.entity.HttpEntityWrapper; import com.fr.third.org.apache.http.entity.HttpEntityWrapper;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
import com.fr.third.org.apache.http.util.EntityUtils; import com.fr.third.org.apache.http.util.EntityUtils;
@ -117,8 +113,8 @@ public class BasicManagedEntity extends HttpEntityWrapper
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
super.writeTo(outstream); super.writeTo(outStream);
ensureConsumed(); ensureConsumed();
} }

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ClientConnectionManagerFactory.java

@ -27,8 +27,6 @@
package com.fr.third.org.apache.http.conn; package com.fr.third.org.apache.http.conn;
import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.HttpClientConnectionManager;
import com.fr.third.org.apache.http.conn.scheme.SchemeRegistry; import com.fr.third.org.apache.http.conn.scheme.SchemeRegistry;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ClientConnectionOperator.java

@ -31,7 +31,6 @@ import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
@ -39,7 +38,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* ClientConnectionOperator represents a strategy for creating * ClientConnectionOperator represents a strategy for creating
* {@link OperatedClientConnection} instances and updating the underlying * {@link OperatedClientConnection} instances and updating the underlying
* {@link java.net.Socket} of those objects. Implementations will most * {@link java.net.Socket} of those objects. Implementations will most
* likely make use of {@link SchemeSocketFactory}s * likely make use of {@link com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory}s
* to create {@link java.net.Socket} instances. * to create {@link java.net.Socket} instances.
* <p> * <p>
* The methods in this interface allow the creation of plain and layered * The methods in this interface allow the creation of plain and layered

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/MultihomePlainSocketFactory.java

@ -39,7 +39,6 @@ import java.util.List;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory;
import com.fr.third.org.apache.http.conn.scheme.SocketFactory; import com.fr.third.org.apache.http.conn.scheme.SocketFactory;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -56,7 +55,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* @since 4.0 * @since 4.0
* *
* @deprecated (4.1) Do not use. For multihome support socket factories must implement * @deprecated (4.1) Do not use. For multihome support socket factories must implement
* {@link SchemeSocketFactory} interface. * {@link com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory} interface.
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/OperatedClientConnection.java

@ -31,7 +31,6 @@ import java.io.IOException;
import java.net.Socket; import java.net.Socket;
import com.fr.third.org.apache.http.HttpClientConnection; import com.fr.third.org.apache.http.HttpClientConnection;
import com.fr.third.org.apache.http.HttpConnection;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpInetConnection; import com.fr.third.org.apache.http.HttpInetConnection;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -91,7 +90,7 @@ public interface OperatedClientConnection extends HttpClientConnection, HttpInet
* By calling this method, the connection can be re-initialized * By calling this method, the connection can be re-initialized
* with a new Socket instance before {@link #openCompleted} is called. * with a new Socket instance before {@link #openCompleted} is called.
* This enabled the connection to close that socket if * This enabled the connection to close that socket if
* {@link HttpConnection#shutdown shutdown} * {@link com.fr.third.org.apache.http.HttpConnection#shutdown shutdown}
* is called before it is fully open. Closing an unconnected socket * is called before it is fully open. Closing an unconnected socket
* will interrupt a thread that is blocked on the connect. * will interrupt a thread that is blocked on the connect.
* Otherwise, that thread will either time out on the connect, * Otherwise, that thread will either time out on the connect,

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnConnectionParamBean.java

@ -27,8 +27,6 @@
package com.fr.third.org.apache.http.conn.params; package com.fr.third.org.apache.http.conn.params;
import com.fr.third.org.apache.http.conn.params.ConnConnectionPNames;
import com.fr.third.org.apache.http.impl.conn.DefaultHttpResponseParser;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -40,7 +38,7 @@ import com.fr.third.org.apache.http.params.HttpParams;
* @since 4.0 * @since 4.0
* *
* @deprecated (4.1) use custom {@link * @deprecated (4.1) use custom {@link
* DefaultHttpResponseParser} implementation. * com.fr.third.org.apache.http.impl.conn.DefaultHttpResponseParser} implementation.
*/ */
@Deprecated @Deprecated
public class ConnConnectionParamBean extends HttpAbstractParamBean { public class ConnConnectionParamBean extends HttpAbstractParamBean {
@ -51,7 +49,7 @@ public class ConnConnectionParamBean extends HttpAbstractParamBean {
/** /**
* @deprecated (4.2) Use custom {@link * @deprecated (4.2) Use custom {@link
* DefaultHttpResponseParser} implementation * com.fr.third.org.apache.http.impl.conn.DefaultHttpResponseParser} implementation
*/ */
@Deprecated @Deprecated
public void setMaxStatusLineGarbage (final int maxStatusLineGarbage) { public void setMaxStatusLineGarbage (final int maxStatusLineGarbage) {

15
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParams.java

@ -28,9 +28,6 @@ package com.fr.third.org.apache.http.conn.params;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.params.HttpConnectionParams;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -54,13 +51,13 @@ public final class ConnManagerParams implements ConnManagerPNames {
/** /**
* Returns the timeout in milliseconds used when retrieving a * Returns the timeout in milliseconds used when retrieving a
* {@link ManagedClientConnection} from the * {@link com.fr.third.org.apache.http.conn.ManagedClientConnection} from the
* {@link ClientConnectionManager}. * {@link com.fr.third.org.apache.http.conn.ClientConnectionManager}.
* *
* @return timeout in milliseconds. * @return timeout in milliseconds.
* *
* @deprecated (4.1) use {@link * @deprecated (4.1) use {@link
* HttpConnectionParams#getConnectionTimeout(HttpParams)} * com.fr.third.org.apache.http.params.HttpConnectionParams#getConnectionTimeout(HttpParams)}
*/ */
@Deprecated @Deprecated
public static long getTimeout(final HttpParams params) { public static long getTimeout(final HttpParams params) {
@ -70,13 +67,13 @@ public final class ConnManagerParams implements ConnManagerPNames {
/** /**
* Sets the timeout in milliseconds used when retrieving a * Sets the timeout in milliseconds used when retrieving a
* {@link ManagedClientConnection} from the * {@link com.fr.third.org.apache.http.conn.ManagedClientConnection} from the
* {@link ClientConnectionManager}. * {@link com.fr.third.org.apache.http.conn.ClientConnectionManager}.
* *
* @param timeout the timeout in milliseconds * @param timeout the timeout in milliseconds
* *
* @deprecated (4.1) use {@link * @deprecated (4.1) use {@link
* HttpConnectionParams#setConnectionTimeout(HttpParams, int)} * com.fr.third.org.apache.http.params.HttpConnectionParams#setConnectionTimeout(HttpParams, int)}
*/ */
@Deprecated @Deprecated
public static void setTimeout(final HttpParams params, final long timeout) { public static void setTimeout(final HttpParams params, final long timeout) {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRoute.java

@ -26,13 +26,12 @@
*/ */
package com.fr.third.org.apache.http.conn.params; package com.fr.third.org.apache.http.conn.params;
import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
/** /**
* This interface is intended for looking up maximum number of connections * This interface is intended for looking up maximum number of connections
* allowed for a given route. This class can be used by pooling * allowed for a given route. This class can be used by pooling
* {@link ClientConnectionManager connection managers} for * {@link com.fr.third.org.apache.http.conn.ClientConnectionManager connection managers} for
* a fine-grained control of connections on a per route basis. * a fine-grained control of connections on a per route basis.
* *
* @since 4.0 * @since 4.0

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRouteBean.java

@ -31,20 +31,18 @@ import java.util.concurrent.ConcurrentHashMap;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.pool.ConnPoolControl;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* This class maintains a map of HTTP routes to maximum number of connections allowed * This class maintains a map of HTTP routes to maximum number of connections allowed
* for those routes. This class can be used by pooling * for those routes. This class can be used by pooling
* {@link ClientConnectionManager connection managers} for * {@link com.fr.third.org.apache.http.conn.ClientConnectionManager connection managers} for
* a fine-grained control of connections on a per route basis. * a fine-grained control of connections on a per route basis.
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.2) use {@link ConnPoolControl} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.pool.ConnPoolControl}
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.SAFE) @Contract(threading = ThreadingBehavior.SAFE)

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParamBean.java

@ -30,8 +30,6 @@ package com.fr.third.org.apache.http.conn.params;
import java.net.InetAddress; import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -43,7 +41,7 @@ import com.fr.third.org.apache.http.params.HttpParams;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}.
*/ */
@Deprecated @Deprecated
public class ConnRouteParamBean extends HttpAbstractParamBean { public class ConnRouteParamBean extends HttpAbstractParamBean {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParams.java

@ -31,8 +31,6 @@ import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -43,7 +41,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}.
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/scheme/PlainSocketFactory.java

@ -36,8 +36,6 @@ import java.net.UnknownHostException;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.DnsResolver;
import com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory;
import com.fr.third.org.apache.http.conn.ConnectTimeoutException; import com.fr.third.org.apache.http.conn.ConnectTimeoutException;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -48,7 +46,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link PlainConnectionSocketFactory} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory}
*/ */
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
@ -66,7 +64,7 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
} }
/** /**
* @deprecated (4.1) use {@link DnsResolver} * @deprecated (4.1) use {@link com.fr.third.org.apache.http.conn.DnsResolver}
*/ */
@Deprecated @Deprecated
public PlainSocketFactory(final HostNameResolver nameResolver) { public PlainSocketFactory(final HostNameResolver nameResolver) {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContexts.java

@ -27,11 +27,10 @@
package com.fr.third.org.apache.http.conn.ssl; package com.fr.third.org.apache.http.conn.ssl;
import javax.net.ssl.SSLContext;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;

11
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLSocketFactory.java

@ -31,6 +31,7 @@ import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.Socket; import java.net.Socket;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.KeyStore; import java.security.KeyStore;
@ -501,7 +502,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
* (before the SSL handshake happens). * (before the SSL handshake happens).
* *
* The default implementation is a no-op, but could be overridden to, e.g., * The default implementation is a no-op, but could be overridden to, e.g.,
* call {@link SSLSocket#setEnabledCipherSuites(java.lang.String[])}. * call {@link SSLSocket#setEnabledCipherSuites(String[])}.
* @throws IOException (only if overridden) * @throws IOException (only if overridden)
* *
* @since 4.2 * @since 4.2
@ -540,12 +541,8 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
} }
try { try {
sock.connect(remoteAddress, connectTimeout); sock.connect(remoteAddress, connectTimeout);
} catch (final IOException ex) { } catch (final SocketTimeoutException ex) {
try { throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out");
sock.close();
} catch (final IOException ignore) {
}
throw ex;
} }
// Setup SSL layering if necessary // Setup SSL layering if necessary
if (sock instanceof SSLSocket) { if (sock instanceof SSLSocket) {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/cookie/params/CookieSpecParamBean.java

@ -29,8 +29,6 @@ package com.fr.third.org.apache.http.cookie.params;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -42,7 +40,7 @@ import com.fr.third.org.apache.http.params.HttpParams;
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use constructor parameters of {@link * @deprecated (4.3) use constructor parameters of {@link
* CookieSpecProvider}s. * com.fr.third.org.apache.http.cookie.CookieSpecProvider}s.
*/ */
@Deprecated @Deprecated
public class CookieSpecParamBean extends HttpAbstractParamBean { public class CookieSpecParamBean extends HttpAbstractParamBean {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/SpnegoTokenGenerator.java

@ -26,9 +26,6 @@
*/ */
package com.fr.third.org.apache.http.impl.auth; package com.fr.third.org.apache.http.impl.auth;
import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.impl.auth.KerberosScheme;
import java.io.IOException; import java.io.IOException;
/** /**
@ -40,7 +37,7 @@ import java.io.IOException;
* @since 4.1 * @since 4.1
* *
* @deprecated (4.2) subclass {@link KerberosScheme} and override * @deprecated (4.2) subclass {@link KerberosScheme} and override
* {@link KerberosScheme#generateGSSToken(byte[], org.ietf.jgss.Oid, String, Credentials)} * {@link KerberosScheme#generateGSSToken(byte[], org.ietf.jgss.Oid, String, com.fr.third.org.apache.http.auth.Credentials)}
*/ */
@Deprecated @Deprecated
public interface SpnegoTokenGenerator { public interface SpnegoTokenGenerator {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractAuthenticationHandler.java

@ -35,7 +35,6 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import com.fr.third.org.apache.http.client.AuthenticationStrategy;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.FormattedHeader; import com.fr.third.org.apache.http.FormattedHeader;
@ -60,7 +59,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.2) use {@link AuthenticationStrategy} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.client.AuthenticationStrategy}
*/ */
@Deprecated @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractHttpClient.java

@ -30,7 +30,6 @@ package com.fr.third.org.apache.http.impl.client;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.UndeclaredThrowableException; import java.lang.reflect.UndeclaredThrowableException;
import com.fr.third.org.apache.http.client.HttpClient;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.ConnectionReuseStrategy; import com.fr.third.org.apache.http.ConnectionReuseStrategy;
@ -95,7 +94,7 @@ import com.fr.third.org.apache.http.protocol.ImmutableHttpProcessor;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* Base class for {@link HttpClient} implementations. * Base class for {@link com.fr.third.org.apache.http.client.HttpClient} implementations.
* This class acts as a facade to a number of special purpose handler or * This class acts as a facade to a number of special purpose handler or
* strategy implementations responsible for handling of a particular aspect * strategy implementations responsible for handling of a particular aspect
* of the HTTP protocol such as redirect or authentication handling or * of the HTTP protocol such as redirect or authentication handling or

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java

@ -32,7 +32,6 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Queue; import java.util.Queue;
import com.fr.third.org.apache.http.impl.client.BasicAuthCache;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
@ -168,8 +167,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
return false; return false;
} }
final String schemeName = authScheme.getSchemeName(); final String schemeName = authScheme.getSchemeName();
return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || return schemeName.equalsIgnoreCase(AuthPolicy.BASIC);
schemeName.equalsIgnoreCase(AuthPolicy.DIGEST);
} }
public AuthenticationHandler getHandler() { public AuthenticationHandler getHandler() {

9
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ClientParamsStack.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.params.AbstractHttpParams; import com.fr.third.org.apache.http.params.AbstractHttpParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -46,7 +45,7 @@ import com.fr.third.org.apache.http.util.Args;
* </li> * </li>
* <li>Client parameters: * <li>Client parameters:
* specific to an instance of * specific to an instance of
* {@link HttpClient HttpClient}. * {@link com.fr.third.org.apache.http.client.HttpClient HttpClient}.
* These provide client specific defaults. * These provide client specific defaults.
* </li> * </li>
* <li>Request parameters: * <li>Request parameters:
@ -55,7 +54,7 @@ import com.fr.third.org.apache.http.util.Args;
* </li> * </li>
* <li>Override parameters: * <li>Override parameters:
* specific to an instance of * specific to an instance of
* {@link HttpClient HttpClient}. * {@link com.fr.third.org.apache.http.client.HttpClient HttpClient}.
* These can be used to set parameters that cannot be overridden * These can be used to set parameters that cannot be overridden
* on a per-request basis. * on a per-request basis.
* </li> * </li>
@ -66,8 +65,8 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use configuration classes provided 'com.fr.third.org.apache.http.config' * @deprecated (4.3) use configuration classes provided 'org.apache.http.config'
* and 'com.fr.third.org.apache.http.client.config' * and 'org.apache.http.client.config'
*/ */
@Deprecated @Deprecated
public class ClientParamsStack extends AbstractHttpParams { public class ClientParamsStack extends AbstractHttpParams {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/CloseableHttpResponseProxy.java

@ -40,7 +40,7 @@ import com.fr.third.org.apache.http.client.methods.CloseableHttpResponse;
import com.fr.third.org.apache.http.util.EntityUtils; import com.fr.third.org.apache.http.util.EntityUtils;
/** /**
* @since 4.3 * @deprecated Do not use.
*/ */
@Deprecated @Deprecated
class CloseableHttpResponseProxy implements InvocationHandler { class CloseableHttpResponseProxy implements InvocationHandler {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ContentEncodingHttpClient.java

@ -28,7 +28,6 @@ package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.protocol.RequestAcceptEncoding; import com.fr.third.org.apache.http.client.protocol.RequestAcceptEncoding;
import com.fr.third.org.apache.http.client.protocol.ResponseContentEncoding; import com.fr.third.org.apache.http.client.protocol.ResponseContentEncoding;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
@ -42,7 +41,7 @@ import com.fr.third.org.apache.http.protocol.BasicHttpProcessor;
* <b>Deprecation note:</b> due to the way this class modifies a response body * <b>Deprecation note:</b> due to the way this class modifies a response body
* without changing the response headers to reflect the entity changes, it cannot * without changing the response headers to reflect the entity changes, it cannot
* be used as the &quot;backend&quot; for a caching {@link * be used as the &quot;backend&quot; for a caching {@link
* HttpClient} and still have uncompressed responses be cached. * com.fr.third.org.apache.http.client.HttpClient} and still have uncompressed responses be cached.
* Users are encouraged to use the {@link DecompressingHttpClient} instead * Users are encouraged to use the {@link DecompressingHttpClient} instead
* of this class, which can be wired in either before or after caching, depending on * of this class, which can be wired in either before or after caching, depending on
* whether you want to cache responses in compressed or uncompressed form. * whether you want to cache responses in compressed or uncompressed form.

79
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultHttpClient.java

@ -27,13 +27,6 @@
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.params.ClientPNames;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import com.fr.third.org.apache.http.HttpVersion; import com.fr.third.org.apache.http.HttpVersion;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
@ -58,7 +51,7 @@ import com.fr.third.org.apache.http.protocol.RequestUserAgent;
import com.fr.third.org.apache.http.util.VersionInfo; import com.fr.third.org.apache.http.util.VersionInfo;
/** /**
* Default implementation of {@link HttpClient} pre-configured * Default implementation of {@link com.fr.third.org.apache.http.client.HttpClient} pre-configured
* for most common use scenarios. * for most common use scenarios.
* <p> * <p>
* Please see the Javadoc for {@link #createHttpProcessor()} for the details of the interceptors * Please see the Javadoc for {@link #createHttpProcessor()} for the details of the interceptors
@ -84,36 +77,36 @@ import com.fr.third.org.apache.http.util.VersionInfo;
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link CoreProtocolPNames#PROTOCOL_VERSION}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION}</li>
* <li>{@link CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li>
* <li>{@link CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li>
* <li>{@link CoreProtocolPNames#USE_EXPECT_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USE_EXPECT_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#WAIT_FOR_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#USER_AGENT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USER_AGENT}</li>
* <li>{@link CoreConnectionPNames#TCP_NODELAY}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
* <li>{@link CoreConnectionPNames#SO_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#SO_LINGER}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_LINGER}</li>
* <li>{@link CoreConnectionPNames#SO_REUSEADDR}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR}</li>
* <li>{@link CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li>
* <li>{@link CoreConnectionPNames#CONNECTION_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#MAX_LINE_LENGTH}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* <li>{@link CoreConnectionPNames#MAX_HEADER_COUNT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT}</li>
* <li>{@link CoreConnectionPNames#STALE_CONNECTION_CHECK}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK}</li>
* <li>{@link ConnRoutePNames#FORCED_ROUTE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
* <li>{@link ConnRoutePNames#LOCAL_ADDRESS}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
* <li>{@link ConnRoutePNames#DEFAULT_PROXY}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
* <li>{@link CookieSpecPNames#DATE_PATTERNS}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
* <li>{@link CookieSpecPNames#SINGLE_COOKIE_HEADER}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
* <li>{@link AuthPNames#CREDENTIAL_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
* <li>{@link ClientPNames#COOKIE_POLICY}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
* <li>{@link ClientPNames#HANDLE_AUTHENTICATION}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_AUTHENTICATION}</li>
* <li>{@link ClientPNames#HANDLE_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_REDIRECTS}</li>
* <li>{@link ClientPNames#MAX_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#MAX_REDIRECTS}</li>
* <li>{@link ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li>
* <li>{@link ClientPNames#VIRTUAL_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#VIRTUAL_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HEADERS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HEADERS}</li>
* <li>{@link ClientPNames#CONN_MANAGER_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#CONN_MANAGER_TIMEOUT}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0
@ -172,15 +165,15 @@ public class DefaultHttpClient extends AbstractHttpClient {
* Saves the default set of HttpParams in the provided parameter. * Saves the default set of HttpParams in the provided parameter.
* These are: * These are:
* <ul> * <ul>
* <li>{@link CoreProtocolPNames#PROTOCOL_VERSION}: * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION}:
* 1.1</li> * 1.1</li>
* <li>{@link CoreProtocolPNames#HTTP_CONTENT_CHARSET}: * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#HTTP_CONTENT_CHARSET}:
* ISO-8859-1</li> * ISO-8859-1</li>
* <li>{@link CoreConnectionPNames#TCP_NODELAY}: * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}:
* true</li> * true</li>
* <li>{@link CoreConnectionPNames#SOCKET_BUFFER_SIZE}: * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}:
* 8192</li> * 8192</li>
* <li>{@link CoreProtocolPNames#USER_AGENT}: * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USER_AGENT}:
* Apache-HttpClient (Java 1.5)</li> * Apache-HttpClient (Java 1.5)</li>
* </ul> * </ul>
*/ */

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java

@ -38,12 +38,11 @@ import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.MalformedChallengeException; import com.fr.third.org.apache.http.auth.MalformedChallengeException;
import com.fr.third.org.apache.http.auth.params.AuthPNames; import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.client.AuthenticationHandler;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* Default {@link AuthenticationHandler} implementation * Default {@link com.fr.third.org.apache.http.client.AuthenticationHandler} implementation
* for proxy host authentication. * for proxy host authentication.
* *
* @since 4.0 * @since 4.0

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectHandler.java

@ -30,8 +30,6 @@ package com.fr.third.org.apache.http.impl.client;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import com.fr.third.org.apache.http.impl.client.DefaultRedirectStrategy;
import com.fr.third.org.apache.http.impl.client.RedirectLocations;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
@ -139,7 +137,7 @@ public class DefaultRedirectHandler implements RedirectHandler {
try { try {
final URI requestURI = new URI(request.getRequestLine().getUri()); final URI requestURI = new URI(request.getRequestLine().getUri());
final URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target, true); final URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target, URIUtils.DROP_FRAGMENT_AND_NORMALIZE);
uri = URIUtils.resolve(absoluteRequestURI, uri); uri = URIUtils.resolve(absoluteRequestURI, uri);
} catch (final URISyntaxException ex) { } catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex); throw new ProtocolException(ex.getMessage(), ex);
@ -163,7 +161,7 @@ public class DefaultRedirectHandler implements RedirectHandler {
uri.getHost(), uri.getHost(),
uri.getPort(), uri.getPort(),
uri.getScheme()); uri.getScheme());
redirectURI = URIUtils.rewriteURI(uri, target, true); redirectURI = URIUtils.rewriteURI(uri, target, URIUtils.DROP_FRAGMENT_AND_NORMALIZE);
} catch (final URISyntaxException ex) { } catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex); throw new ProtocolException(ex.getMessage(), ex);
} }

76
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRequestDirector.java

@ -33,11 +33,6 @@ import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.ConnectionReuseStrategy; import com.fr.third.org.apache.http.ConnectionReuseStrategy;
@ -99,41 +94,41 @@ import com.fr.third.org.apache.http.util.EntityUtils;
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link CoreProtocolPNames#PROTOCOL_VERSION}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION}</li>
* <li>{@link CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li>
* <li>{@link CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li>
* <li>{@link CoreProtocolPNames#USE_EXPECT_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USE_EXPECT_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#WAIT_FOR_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#USER_AGENT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USER_AGENT}</li>
* <li>{@link CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li>
* <li>{@link CoreConnectionPNames#MAX_LINE_LENGTH}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* <li>{@link CoreConnectionPNames#MAX_HEADER_COUNT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT}</li>
* <li>{@link CoreConnectionPNames#SO_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#SO_LINGER}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_LINGER}</li>
* <li>{@link CoreConnectionPNames#SO_REUSEADDR}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR}</li>
* <li>{@link CoreConnectionPNames#TCP_NODELAY}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
* <li>{@link CoreConnectionPNames#CONNECTION_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#STALE_CONNECTION_CHECK}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK}</li>
* <li>{@link ConnRoutePNames#FORCED_ROUTE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
* <li>{@link ConnRoutePNames#LOCAL_ADDRESS}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
* <li>{@link ConnRoutePNames#DEFAULT_PROXY}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
* <li>{@link CookieSpecPNames#DATE_PATTERNS}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
* <li>{@link CookieSpecPNames#SINGLE_COOKIE_HEADER}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
* <li>{@link AuthPNames#CREDENTIAL_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
* <li>{@link ClientPNames#COOKIE_POLICY}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
* <li>{@link ClientPNames#HANDLE_AUTHENTICATION}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_AUTHENTICATION}</li>
* <li>{@link ClientPNames#HANDLE_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_REDIRECTS}</li>
* <li>{@link ClientPNames#MAX_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#MAX_REDIRECTS}</li>
* <li>{@link ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li>
* <li>{@link ClientPNames#VIRTUAL_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#VIRTUAL_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HEADERS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HEADERS}</li>
* <li>{@link ClientPNames#CONN_MANAGER_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#CONN_MANAGER_TIMEOUT}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) * @deprecated Do not use.
*/ */
@Deprecated @Deprecated
public class DefaultRequestDirector implements RequestDirector { public class DefaultRequestDirector implements RequestDirector {
@ -162,21 +157,18 @@ public class DefaultRequestDirector implements RequestDirector {
protected final HttpRequestRetryHandler retryHandler; protected final HttpRequestRetryHandler retryHandler;
/** The redirect handler. */ /** The redirect handler. */
@Deprecated
protected final RedirectHandler redirectHandler; protected final RedirectHandler redirectHandler;
/** The redirect strategy. */ /** The redirect strategy. */
protected final RedirectStrategy redirectStrategy; protected final RedirectStrategy redirectStrategy;
/** The target authentication handler. */ /** The target authentication handler. */
@Deprecated
protected final AuthenticationHandler targetAuthHandler; protected final AuthenticationHandler targetAuthHandler;
/** The target authentication handler. */ /** The target authentication handler. */
protected final AuthenticationStrategy targetAuthStrategy; protected final AuthenticationStrategy targetAuthStrategy;
/** The proxy authentication handler. */ /** The proxy authentication handler. */
@Deprecated
protected final AuthenticationHandler proxyAuthHandler; protected final AuthenticationHandler proxyAuthHandler;
/** The proxy authentication handler. */ /** The proxy authentication handler. */
@ -205,7 +197,6 @@ public class DefaultRequestDirector implements RequestDirector {
private HttpHost virtualHost; private HttpHost virtualHost;
@Deprecated
public DefaultRequestDirector( public DefaultRequestDirector(
final HttpRequestExecutor requestExec, final HttpRequestExecutor requestExec,
final ClientConnectionManager conman, final ClientConnectionManager conman,
@ -229,7 +220,6 @@ public class DefaultRequestDirector implements RequestDirector {
} }
@Deprecated
public DefaultRequestDirector( public DefaultRequestDirector(
final Log log, final Log log,
final HttpRequestExecutor requestExec, final HttpRequestExecutor requestExec,
@ -347,14 +337,14 @@ public class DefaultRequestDirector implements RequestDirector {
// Make sure the request URI is absolute // Make sure the request URI is absolute
if (!uri.isAbsolute()) { if (!uri.isAbsolute()) {
final HttpHost target = route.getTargetHost(); final HttpHost target = route.getTargetHost();
uri = URIUtils.rewriteURI(uri, target, true); uri = URIUtils.rewriteURI(uri, target, URIUtils.DROP_FRAGMENT_AND_NORMALIZE);
} else { } else {
uri = URIUtils.rewriteURI(uri); uri = URIUtils.rewriteURI(uri);
} }
} else { } else {
// Make sure the request URI is relative // Make sure the request URI is relative
if (uri.isAbsolute()) { if (uri.isAbsolute()) {
uri = URIUtils.rewriteURI(uri, null, true); uri = URIUtils.rewriteURI(uri, null, URIUtils.DROP_FRAGMENT_AND_NORMALIZE);
} else { } else {
uri = URIUtils.rewriteURI(uri); uri = URIUtils.rewriteURI(uri);
} }

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java

@ -38,12 +38,11 @@ import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.MalformedChallengeException; import com.fr.third.org.apache.http.auth.MalformedChallengeException;
import com.fr.third.org.apache.http.auth.params.AuthPNames; import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.client.AuthenticationHandler;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* Default {@link AuthenticationHandler} implementation * Default {@link com.fr.third.org.apache.http.client.AuthenticationHandler} implementation
* for target host authentication. * for target host authentication.
* *
* @since 4.0 * @since 4.0

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/RoutedRequest.java

@ -28,7 +28,6 @@
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.impl.client.RequestWrapper;
/** /**
* A request with the route along which it should be sent. * A request with the route along which it should be sent.

68
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/SystemDefaultHttpClient.java

@ -29,12 +29,6 @@ package com.fr.third.org.apache.http.impl.client;
import java.net.ProxySelector; import java.net.ProxySelector;
import com.fr.third.org.apache.http.auth.params.AuthPNames;
import com.fr.third.org.apache.http.client.params.ClientPNames;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import com.fr.third.org.apache.http.ConnectionReuseStrategy; import com.fr.third.org.apache.http.ConnectionReuseStrategy;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
@ -65,6 +59,8 @@ import com.fr.third.org.apache.http.params.HttpParams;
* <li>javax.net.ssl.keyStorePassword</li> * <li>javax.net.ssl.keyStorePassword</li>
* <li>http.proxyHost</li> * <li>http.proxyHost</li>
* <li>http.proxyPort</li> * <li>http.proxyPort</li>
* <li>https.proxyHost</li>
* <li>https.proxyPort</li>
* <li>http.nonProxyHosts</li> * <li>http.nonProxyHosts</li>
* <li>http.keepAlive</li> * <li>http.keepAlive</li>
* <li>http.maxConnections</li> * <li>http.maxConnections</li>
@ -75,36 +71,36 @@ import com.fr.third.org.apache.http.params.HttpParams;
* class: * class:
* </p> * </p>
* <ul> * <ul>
* <li>{@link CoreProtocolPNames#PROTOCOL_VERSION}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION}</li>
* <li>{@link CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li>
* <li>{@link CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li>
* <li>{@link CoreProtocolPNames#USE_EXPECT_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USE_EXPECT_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#WAIT_FOR_CONTINUE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE}</li>
* <li>{@link CoreProtocolPNames#USER_AGENT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#USER_AGENT}</li>
* <li>{@link CoreConnectionPNames#TCP_NODELAY}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
* <li>{@link CoreConnectionPNames#SO_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#SO_LINGER}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_LINGER}</li>
* <li>{@link CoreConnectionPNames#SO_REUSEADDR}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR}</li>
* <li>{@link CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li>
* <li>{@link CoreConnectionPNames#CONNECTION_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#MAX_LINE_LENGTH}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* <li>{@link CoreConnectionPNames#MAX_HEADER_COUNT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT}</li>
* <li>{@link CoreConnectionPNames#STALE_CONNECTION_CHECK}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK}</li>
* <li>{@link ConnRoutePNames#FORCED_ROUTE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
* <li>{@link ConnRoutePNames#LOCAL_ADDRESS}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
* <li>{@link ConnRoutePNames#DEFAULT_PROXY}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
* <li>{@link CookieSpecPNames#DATE_PATTERNS}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
* <li>{@link CookieSpecPNames#SINGLE_COOKIE_HEADER}</li> * <li>{@link com.fr.third.org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
* <li>{@link AuthPNames#CREDENTIAL_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
* <li>{@link ClientPNames#COOKIE_POLICY}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
* <li>{@link ClientPNames#HANDLE_AUTHENTICATION}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_AUTHENTICATION}</li>
* <li>{@link ClientPNames#HANDLE_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#HANDLE_REDIRECTS}</li>
* <li>{@link ClientPNames#MAX_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#MAX_REDIRECTS}</li>
* <li>{@link ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#ALLOW_CIRCULAR_REDIRECTS}</li>
* <li>{@link ClientPNames#VIRTUAL_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#VIRTUAL_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HOST}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HOST}</li>
* <li>{@link ClientPNames#DEFAULT_HEADERS}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#DEFAULT_HEADERS}</li>
* <li>{@link ClientPNames#CONN_MANAGER_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.client.params.ClientPNames#CONN_MANAGER_TIMEOUT}</li>
* </ul> * </ul>
* *
* @since 4.2 * @since 4.2

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractClientConnAdapter.java

@ -42,7 +42,6 @@ import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection; import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.impl.conn.ConnectionShutdownException;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPoolEntry.java

@ -30,7 +30,6 @@ import java.io.IOException;
import java.io.InterruptedIOException; import java.io.InterruptedIOException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -194,7 +193,7 @@ public abstract class AbstractPoolEntry {
* request to the previous proxy. * request to the previous proxy.
* *
* @param next the proxy to which the tunnel was established. * @param next the proxy to which the tunnel was established.
* See {@link ManagedClientConnection#tunnelProxy * See {@link com.fr.third.org.apache.http.conn.ManagedClientConnection#tunnelProxy
* ManagedClientConnection.tunnelProxy} * ManagedClientConnection.tunnelProxy}
* for details. * for details.
* @param secure {@code true} if the tunnel should be * @param secure {@code true} if the tunnel should be

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPooledConnAdapter.java

@ -30,7 +30,6 @@ import java.io.IOException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -38,7 +37,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* Abstract adapter from pool {@link AbstractPoolEntry entries} to * Abstract adapter from pool {@link AbstractPoolEntry entries} to
* {@link ManagedClientConnection managed} * {@link com.fr.third.org.apache.http.conn.ManagedClientConnection managed}
* client connections. * client connections.
* The connection in the pool entry is used to initialize the base class. * The connection in the pool entry is used to initialize the base class.
* In addition, methods to establish a route are delegated to the * In addition, methods to establish a route are delegated to the

14
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/BasicClientConnectionManager.java

@ -141,7 +141,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
@Override @Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) { final long timeout, final TimeUnit timeUnit) {
return BasicClientConnectionManager.this.getConnection( return BasicClientConnectionManager.this.getConnection(
route, state); route, state);
} }
@ -191,7 +191,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
@Override @Override
public void releaseConnection(final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) { public void releaseConnection(final ManagedClientConnection conn, final long keepalive, final TimeUnit timeUnit) {
Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " + Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " +
"connection not obtained from this manager"); "connection not obtained from this manager");
final ManagedClientConnectionImpl managedConn = (ManagedClientConnectionImpl) conn; final ManagedClientConnectionImpl managedConn = (ManagedClientConnectionImpl) conn;
@ -214,11 +214,11 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
shutdownConnection(managedConn); shutdownConnection(managedConn);
} }
if (managedConn.isMarkedReusable()) { if (managedConn.isMarkedReusable()) {
this.poolEntry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS); this.poolEntry.updateExpiry(keepalive, timeUnit != null ? timeUnit : TimeUnit.MILLISECONDS);
if (this.log.isDebugEnabled()) { if (this.log.isDebugEnabled()) {
final String s; final String s;
if (keepalive > 0) { if (keepalive > 0) {
s = "for " + keepalive + " " + tunit; s = "for " + keepalive + " " + timeUnit;
} else { } else {
s = "indefinitely"; s = "indefinitely";
} }
@ -249,11 +249,11 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
@Override @Override
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit timeUnit) {
Args.notNull(tunit, "Time unit"); Args.notNull(timeUnit, "Time unit");
synchronized (this) { synchronized (this) {
assertNotShutdown(); assertNotShutdown();
long time = tunit.toMillis(idletime); long time = timeUnit.toMillis(idletime);
if (time < 0) { if (time < 0) {
time = 0; time = 0;
} }

16
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnection.java

@ -187,29 +187,29 @@ public class DefaultClientConnection extends SocketHttpClientConnection
@Override @Override
protected SessionInputBuffer createSessionInputBuffer( protected SessionInputBuffer createSessionInputBuffer(
final Socket socket, final Socket socket,
final int buffersize, final int bufferSize,
final HttpParams params) throws IOException { final HttpParams params) throws IOException {
SessionInputBuffer inbuffer = super.createSessionInputBuffer( SessionInputBuffer inBuffer = super.createSessionInputBuffer(
socket, socket,
buffersize > 0 ? buffersize : 8192, bufferSize > 0 ? bufferSize : 8192,
params); params);
if (wireLog.isDebugEnabled()) { if (wireLog.isDebugEnabled()) {
inbuffer = new LoggingSessionInputBuffer( inBuffer = new LoggingSessionInputBuffer(
inbuffer, inBuffer,
new Wire(wireLog), new Wire(wireLog),
HttpProtocolParams.getHttpElementCharset(params)); HttpProtocolParams.getHttpElementCharset(params));
} }
return inbuffer; return inBuffer;
} }
@Override @Override
protected SessionOutputBuffer createSessionOutputBuffer( protected SessionOutputBuffer createSessionOutputBuffer(
final Socket socket, final Socket socket,
final int buffersize, final int bufferSize,
final HttpParams params) throws IOException { final HttpParams params) throws IOException {
SessionOutputBuffer outbuffer = super.createSessionOutputBuffer( SessionOutputBuffer outbuffer = super.createSessionOutputBuffer(
socket, socket,
buffersize > 0 ? buffersize : 8192, bufferSize > 0 ? bufferSize : 8192,
params); params);
if (wireLog.isDebugEnabled()) { if (wireLog.isDebugEnabled()) {
outbuffer = new LoggingSessionOutputBuffer( outbuffer = new LoggingSessionOutputBuffer(

22
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnectionOperator.java

@ -34,8 +34,6 @@ import java.net.InetSocketAddress;
import java.net.Socket; import java.net.Socket;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
@ -64,7 +62,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* This connection operator is multihome network aware and will attempt to retry failed connects * This connection operator is multihome network aware and will attempt to retry failed connects
* against all known IP addresses sequentially until the connect is successful or all known * against all known IP addresses sequentially until the connect is successful or all known
* addresses fail to respond. Please note the same * addresses fail to respond. Please note the same
* {@link CoreConnectionPNames#CONNECTION_TIMEOUT} value will be used * {@link com.fr.third.org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT} value will be used
* for each connection attempt, so in the worst case the total elapsed time before timeout * for each connection attempt, so in the worst case the total elapsed time before timeout
* can be {@code CONNECTION_TIMEOUT * n} where {@code n} is the number of IP addresses * can be {@code CONNECTION_TIMEOUT * n} where {@code n} is the number of IP addresses
* of the given host. One can disable multihome support by overriding * of the given host. One can disable multihome support by overriding
@ -74,14 +72,14 @@ import com.fr.third.org.apache.http.util.Asserts;
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li>
* <li>{@link CoreConnectionPNames#SO_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#SO_LINGER}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_LINGER}</li>
* <li>{@link CoreConnectionPNames#SO_REUSEADDR}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR}</li>
* <li>{@link CoreConnectionPNames#TCP_NODELAY}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
* <li>{@link CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li>
* <li>{@link CoreConnectionPNames#CONNECTION_TIMEOUT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
* <li>{@link CoreConnectionPNames#MAX_LINE_LENGTH}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0
@ -254,7 +252,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
* *
* @param host host name to resolve * @param host host name to resolve
* @return array of IP addresses * @return array of IP addresses
* @exception UnknownHostException if no IP address for the host could be determined. * @throws UnknownHostException if no IP address for the host could be determined.
* *
* @see DnsResolver * @see DnsResolver
* @see SystemDefaultDnsResolver * @see SystemDefaultDnsResolver

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java

@ -35,8 +35,6 @@ import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.impl.conn.DefaultRoutePlanner;
import com.fr.third.org.apache.http.conn.params.ConnRouteParams; import com.fr.third.org.apache.http.conn.params.ConnRouteParams;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner; import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner;
@ -48,16 +46,16 @@ import com.fr.third.org.apache.http.util.Asserts;
/** /**
* Default implementation of an {@link HttpRoutePlanner}. This implementation * Default implementation of an {@link HttpRoutePlanner}. This implementation
* is based on {@link ConnRoutePNames parameters}. * is based on {@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames parameters}.
* It will not make use of any Java system properties, nor of system or * It will not make use of any Java system properties, nor of system or
* browser proxy settings. * browser proxy settings.
* <p> * <p>
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link ConnRoutePNames#DEFAULT_PROXY}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
* <li>{@link ConnRoutePNames#LOCAL_ADDRESS}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
* <li>{@link ConnRoutePNames#FORCED_ROUTE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0

11
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultResponseParser.java

@ -29,9 +29,6 @@ package com.fr.third.org.apache.http.impl.conn;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.conn.params.ConnConnectionPNames;
import com.fr.third.org.apache.http.impl.conn.DefaultHttpResponseParser;
import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
@ -56,9 +53,9 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link CoreConnectionPNames#MAX_HEADER_COUNT}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT}</li>
* <li>{@link CoreConnectionPNames#MAX_LINE_LENGTH}</li> * <li>{@link com.fr.third.org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* <li>{@link ConnConnectionPNames#MAX_STATUS_LINE_GARBAGE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnConnectionPNames#MAX_STATUS_LINE_GARBAGE}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0
@ -89,7 +86,7 @@ public class DefaultResponseParser extends AbstractMessageParser<HttpMessage> {
protected int getMaxGarbageLines(final HttpParams params) { protected int getMaxGarbageLines(final HttpParams params) {
return params.getIntParameter( return params.getIntParameter(
ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, com.fr.third.org.apache.http.conn.params.ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE,
Integer.MAX_VALUE); Integer.MAX_VALUE);
} }

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpConnPool.java

@ -49,22 +49,22 @@ class HttpConnPool extends AbstractConnPool<HttpRoute, OperatedClientConnection,
private final Log log; private final Log log;
private final long timeToLive; private final long timeToLive;
private final TimeUnit tunit; private final TimeUnit timeUnit;
public HttpConnPool(final Log log, public HttpConnPool(final Log log,
final ClientConnectionOperator connOperator, final ClientConnectionOperator connOperator,
final int defaultMaxPerRoute, final int maxTotal, final int defaultMaxPerRoute, final int maxTotal,
final long timeToLive, final TimeUnit tunit) { final long timeToLive, final TimeUnit timeUnit) {
super(new InternalConnFactory(connOperator), defaultMaxPerRoute, maxTotal); super(new InternalConnFactory(connOperator), defaultMaxPerRoute, maxTotal);
this.log = log; this.log = log;
this.timeToLive = timeToLive; this.timeToLive = timeToLive;
this.tunit = tunit; this.timeUnit = timeUnit;
} }
@Override @Override
protected HttpPoolEntry createEntry(final HttpRoute route, final OperatedClientConnection conn) { protected HttpPoolEntry createEntry(final HttpRoute route, final OperatedClientConnection conn) {
final String id = Long.toString(COUNTER.getAndIncrement()); final String id = Long.toString(COUNTER.getAndIncrement());
return new HttpPoolEntry(this.log, id, route, conn, this.timeToLive, this.tunit); return new HttpPoolEntry(this.log, id, route, conn, this.timeToLive, this.timeUnit);
} }
static class InternalConnFactory implements ConnFactory<HttpRoute, OperatedClientConnection> { static class InternalConnFactory implements ConnFactory<HttpRoute, OperatedClientConnection> {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpPoolEntry.java

@ -52,8 +52,8 @@ class HttpPoolEntry extends PoolEntry<HttpRoute, OperatedClientConnection> {
final String id, final String id,
final HttpRoute route, final HttpRoute route,
final OperatedClientConnection conn, final OperatedClientConnection conn,
final long timeToLive, final TimeUnit tunit) { final long timeToLive, final TimeUnit timeUnit) {
super(id, route, conn, timeToLive, tunit); super(id, route, conn, timeToLive, timeUnit);
this.log = log; this.log = log;
this.tracker = new RouteTracker(route); this.tracker = new RouteTracker(route);
} }

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/IdleConnectionHandler.java

@ -32,18 +32,18 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpConnection; import com.fr.third.org.apache.http.HttpConnection;
// Currently only used by AbstractConnPool // Currently only used by AbstractConnPool
/** /**
* A helper class for connection managers to track idle connections. * A helper class for connection managers to track idle connections.
* *
* <p>This class is not synchronized.</p> * <p>This class is not synchronized.</p>
* *
* @see ClientConnectionManager#closeIdleConnections * @see com.fr.third.org.apache.http.conn.ClientConnectionManager#closeIdleConnections
* *
* @since 4.0 * @since 4.0
* *

35
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionInputBuffer.java

@ -31,7 +31,6 @@ import java.io.IOException;
import com.fr.third.org.apache.http.Consts; import com.fr.third.org.apache.http.Consts;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.conn.Wire;
import com.fr.third.org.apache.http.io.EofSensor; import com.fr.third.org.apache.http.io.EofSensor;
import com.fr.third.org.apache.http.io.HttpTransportMetrics; import com.fr.third.org.apache.http.io.HttpTransportMetrics;
import com.fr.third.org.apache.http.io.SessionInputBuffer; import com.fr.third.org.apache.http.io.SessionInputBuffer;
@ -84,29 +83,29 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
@Override @Override
public int read(final byte[] b, final int off, final int len) throws IOException { public int read(final byte[] b, final int off, final int len) throws IOException {
final int l = this.in.read(b, off, len); final int readLen = this.in.read(b, off, len);
if (this.wire.enabled() && l > 0) { if (this.wire.enabled() && readLen > 0) {
this.wire.input(b, off, l); this.wire.input(b, off, readLen);
} }
return l; return readLen;
} }
@Override @Override
public int read() throws IOException { public int read() throws IOException {
final int l = this.in.read(); final int b = this.in.read();
if (this.wire.enabled() && l != -1) { if (this.wire.enabled() && b != -1) {
this.wire.input(l); this.wire.input(b);
} }
return l; return b;
} }
@Override @Override
public int read(final byte[] b) throws IOException { public int read(final byte[] b) throws IOException {
final int l = this.in.read(b); final int readLen = this.in.read(b);
if (this.wire.enabled() && l > 0) { if (this.wire.enabled() && readLen > 0) {
this.wire.input(b, 0, l); this.wire.input(b, 0, readLen);
} }
return l; return readLen;
} }
@Override @Override
@ -121,14 +120,14 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
@Override @Override
public int readLine(final CharArrayBuffer buffer) throws IOException { public int readLine(final CharArrayBuffer buffer) throws IOException {
final int l = this.in.readLine(buffer); final int readLen = this.in.readLine(buffer);
if (this.wire.enabled() && l >= 0) { if (this.wire.enabled() && readLen >= 0) {
final int pos = buffer.length() - l; final int pos = buffer.length() - readLen;
final String s = new String(buffer.buffer(), pos, l); final String s = new String(buffer.buffer(), pos, readLen);
final String tmp = s + "\r\n"; final String tmp = s + "\r\n";
this.wire.input(tmp.getBytes(this.charset)); this.wire.input(tmp.getBytes(this.charset));
} }
return l; return readLen;
} }
@Override @Override

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java

@ -31,7 +31,6 @@ import java.io.IOException;
import com.fr.third.org.apache.http.Consts; import com.fr.third.org.apache.http.Consts;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.conn.Wire;
import com.fr.third.org.apache.http.io.HttpTransportMetrics; import com.fr.third.org.apache.http.io.HttpTransportMetrics;
import com.fr.third.org.apache.http.io.SessionOutputBuffer; import com.fr.third.org.apache.http.io.SessionOutputBuffer;
import com.fr.third.org.apache.http.util.CharArrayBuffer; import com.fr.third.org.apache.http.util.CharArrayBuffer;

31
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/PoolingClientConnectionManager.java

@ -32,7 +32,6 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
@ -51,7 +50,7 @@ import com.fr.third.org.apache.http.util.Args;
import com.fr.third.org.apache.http.util.Asserts; import com.fr.third.org.apache.http.util.Asserts;
/** /**
* Manages a pool of {@link OperatedClientConnection} * Manages a pool of {@link com.fr.third.org.apache.http.conn.OperatedClientConnection}
* and is able to service connection requests from multiple execution threads. * and is able to service connection requests from multiple execution threads.
* Connections are pooled on a per route basis. A request for a route which * Connections are pooled on a per route basis. A request for a route which
* already the manager has persistent connections for available in the pool * already the manager has persistent connections for available in the pool
@ -99,12 +98,12 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
public PoolingClientConnectionManager( public PoolingClientConnectionManager(
final SchemeRegistry schemeRegistry, final SchemeRegistry schemeRegistry,
final long timeToLive, final TimeUnit tunit) { final long timeToLive, final TimeUnit timeUnit) {
this(schemeRegistry, timeToLive, tunit, new SystemDefaultDnsResolver()); this(schemeRegistry, timeToLive, timeUnit, new SystemDefaultDnsResolver());
} }
public PoolingClientConnectionManager(final SchemeRegistry schemeRegistry, public PoolingClientConnectionManager(final SchemeRegistry schemeRegistry,
final long timeToLive, final TimeUnit tunit, final long timeToLive, final TimeUnit timeUnit,
final DnsResolver dnsResolver) { final DnsResolver dnsResolver) {
super(); super();
Args.notNull(schemeRegistry, "Scheme registry"); Args.notNull(schemeRegistry, "Scheme registry");
@ -112,7 +111,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
this.schemeRegistry = schemeRegistry; this.schemeRegistry = schemeRegistry;
this.dnsResolver = dnsResolver; this.dnsResolver = dnsResolver;
this.operator = createConnectionOperator(schemeRegistry); this.operator = createConnectionOperator(schemeRegistry);
this.pool = new HttpConnPool(this.log, this.operator, 2, 20, timeToLive, tunit); this.pool = new HttpConnPool(this.log, this.operator, 2, 20, timeToLive, timeUnit);
} }
@Override @Override
@ -197,8 +196,8 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
@Override @Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final long timeout,
final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException { final TimeUnit timeUnit) throws InterruptedException, ConnectionPoolTimeoutException {
return leaseConnection(future, timeout, tunit); return leaseConnection(future, timeout, timeUnit);
} }
}; };
@ -208,10 +207,10 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
ManagedClientConnection leaseConnection( ManagedClientConnection leaseConnection(
final Future<HttpPoolEntry> future, final Future<HttpPoolEntry> future,
final long timeout, final long timeout,
final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException { final TimeUnit timeUnit) throws InterruptedException, ConnectionPoolTimeoutException {
final HttpPoolEntry entry; final HttpPoolEntry entry;
try { try {
entry = future.get(timeout, tunit); entry = future.get(timeout, timeUnit);
if (entry == null || future.isCancelled()) { if (entry == null || future.isCancelled()) {
throw new InterruptedException(); throw new InterruptedException();
} }
@ -235,7 +234,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
@Override @Override
public void releaseConnection( public void releaseConnection(
final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) { final ManagedClientConnection conn, final long keepalive, final TimeUnit timeUnit) {
Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " + Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " +
"connection not obtained from this manager"); "connection not obtained from this manager");
@ -258,11 +257,11 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
} }
// Only reusable connections can be kept alive // Only reusable connections can be kept alive
if (managedConn.isMarkedReusable()) { if (managedConn.isMarkedReusable()) {
entry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS); entry.updateExpiry(keepalive, timeUnit != null ? timeUnit : TimeUnit.MILLISECONDS);
if (this.log.isDebugEnabled()) { if (this.log.isDebugEnabled()) {
final String s; final String s;
if (keepalive > 0) { if (keepalive > 0) {
s = "for " + keepalive + " " + tunit; s = "for " + keepalive + " " + timeUnit;
} else { } else {
s = "indefinitely"; s = "indefinitely";
} }
@ -290,11 +289,11 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
} }
@Override @Override
public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) { public void closeIdleConnections(final long idleTimeout, final TimeUnit timeUnit) {
if (this.log.isDebugEnabled()) { if (this.log.isDebugEnabled()) {
this.log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit); this.log.debug("Closing connections idle longer than " + idleTimeout + " " + timeUnit);
} }
this.pool.closeIdle(idleTimeout, tunit); this.pool.closeIdle(idleTimeout, timeUnit);
} }
@Override @Override

12
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java

@ -39,8 +39,6 @@ import java.util.List;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.impl.conn.SystemDefaultRoutePlanner;
import com.fr.third.org.apache.http.conn.params.ConnRouteParams; import com.fr.third.org.apache.http.conn.params.ConnRouteParams;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner; import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner;
@ -53,19 +51,19 @@ import com.fr.third.org.apache.http.util.Asserts;
/** /**
* Default implementation of an {@link HttpRoutePlanner}. * Default implementation of an {@link HttpRoutePlanner}.
* This implementation is based on {@link java.net.ProxySelector}. * This implementation is based on {@link ProxySelector}.
* By default, it will pick up the proxy settings of the JVM, either * By default, it will pick up the proxy settings of the JVM, either
* from system properties or from the browser running the application. * from system properties or from the browser running the application.
* Additionally, it interprets some * Additionally, it interprets some
* {@link ConnRoutePNames parameters}, * {@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames parameters},
* though not the {@link * though not the {@link
* ConnRoutePNames#DEFAULT_PROXY DEFAULT_PROXY}. * com.fr.third.org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY DEFAULT_PROXY}.
* <p> * <p>
* The following parameters can be used to customize the behavior of this * The following parameters can be used to customize the behavior of this
* class: * class:
* <ul> * <ul>
* <li>{@link ConnRoutePNames#LOCAL_ADDRESS}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
* <li>{@link ConnRoutePNames#FORCED_ROUTE}</li> * <li>{@link com.fr.third.org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
* </ul> * </ul>
* *
* @since 4.0 * @since 4.0

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SchemeRegistryFactory.java

@ -28,7 +28,6 @@ package com.fr.third.org.apache.http.impl.conn;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.client.HttpClientBuilder;
import com.fr.third.org.apache.http.conn.scheme.PlainSocketFactory; import com.fr.third.org.apache.http.conn.scheme.PlainSocketFactory;
import com.fr.third.org.apache.http.conn.scheme.Scheme; import com.fr.third.org.apache.http.conn.scheme.Scheme;
import com.fr.third.org.apache.http.conn.scheme.SchemeRegistry; import com.fr.third.org.apache.http.conn.scheme.SchemeRegistry;
@ -37,7 +36,7 @@ import com.fr.third.org.apache.http.conn.ssl.SSLSocketFactory;
/** /**
* @since 4.1 * @since 4.1
* *
* @deprecated (4.3) use {@link HttpClientBuilder}. * @deprecated (4.3) use {@link com.fr.third.org.apache.http.impl.client.HttpClientBuilder}.
*/ */
@Contract(threading = ThreadingBehavior.SAFE) @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SingleClientConnManager.java

@ -186,7 +186,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
@Override @Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) { final long timeout, final TimeUnit timeUnit) {
return SingleClientConnManager.this.getConnection( return SingleClientConnManager.this.getConnection(
route, state); route, state);
} }
@ -317,16 +317,16 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
@Override @Override
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit timeUnit) {
assertStillUp(); assertStillUp();
// idletime can be 0 or negative, no problem there // idletime can be 0 or negative, no problem there
Args.notNull(tunit, "Time unit"); Args.notNull(timeUnit, "Time unit");
synchronized (this) { synchronized (this) {
if ((managedConn == null) && uniquePoolEntry.connection.isOpen()) { if ((managedConn == null) && uniquePoolEntry.connection.isOpen()) {
final long cutoff = final long cutoff =
System.currentTimeMillis() - tunit.toMillis(idletime); System.currentTimeMillis() - timeUnit.toMillis(idletime);
if (lastReleaseTime <= cutoff) { if (lastReleaseTime <= cutoff) {
try { try {
uniquePoolEntry.close(); uniquePoolEntry.close();

14
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/AbstractConnPool.java

@ -99,7 +99,7 @@ public abstract class AbstractConnPool {
* @param route the route for which to get the connection * @param route the route for which to get the connection
* @param state the state * @param state the state
* @param timeout the timeout, 0 or negative for no timeout * @param timeout the timeout, 0 or negative for no timeout
* @param tunit the unit for the {@code timeout}, * @param timeUnit the unit for the {@code timeout},
* may be {@code null} only if there is no timeout * may be {@code null} only if there is no timeout
* *
* @return pool entry holding a connection for the route * @return pool entry holding a connection for the route
@ -114,9 +114,9 @@ public abstract class AbstractConnPool {
final HttpRoute route, final HttpRoute route,
final Object state, final Object state,
final long timeout, final long timeout,
final TimeUnit tunit) final TimeUnit timeUnit)
throws ConnectionPoolTimeoutException, InterruptedException { throws ConnectionPoolTimeoutException, InterruptedException {
return requestPoolEntry(route, state).getPoolEntry(timeout, tunit); return requestPoolEntry(route, state).getPoolEntry(timeout, timeUnit);
} }
/** /**
@ -154,16 +154,16 @@ public abstract class AbstractConnPool {
* *
* @param idletime the time the connections should have been idle * @param idletime the time the connections should have been idle
* in order to be closed now * in order to be closed now
* @param tunit the unit for the {@code idletime} * @param timeUnit the unit for the {@code idletime}
*/ */
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit timeUnit) {
// idletime can be 0 or negative, no problem there // idletime can be 0 or negative, no problem there
Args.notNull(tunit, "Time unit"); Args.notNull(timeUnit, "Time unit");
poolLock.lock(); poolLock.lock();
try { try {
idleConnHandler.closeIdleConnections(tunit.toMillis(idletime)); idleConnHandler.closeIdleConnections(timeUnit.toMillis(idletime));
} finally { } finally {
poolLock.unlock(); poolLock.unlock();
} }

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java

@ -29,7 +29,6 @@ package com.fr.third.org.apache.http.impl.conn.tsccm;
import java.lang.ref.ReferenceQueue; import java.lang.ref.ReferenceQueue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import com.fr.third.org.apache.http.pool.PoolEntry;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -41,7 +40,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.2) use {@link PoolEntry} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.pool.PoolEntry}
*/ */
@Deprecated @Deprecated
public class BasicPoolEntry extends AbstractPoolEntry { public class BasicPoolEntry extends AbstractPoolEntry {

20
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java

@ -295,9 +295,9 @@ public class ConnPoolByRoute extends AbstractConnPool {
@Override @Override
public BasicPoolEntry getPoolEntry( public BasicPoolEntry getPoolEntry(
final long timeout, final long timeout,
final TimeUnit tunit) final TimeUnit timeUnit)
throws InterruptedException, ConnectionPoolTimeoutException { throws InterruptedException, ConnectionPoolTimeoutException {
return getEntryBlocking(route, state, timeout, tunit, aborter); return getEntryBlocking(route, state, timeout, timeUnit, aborter);
} }
}; };
@ -310,7 +310,7 @@ public class ConnPoolByRoute extends AbstractConnPool {
* *
* @param route the route for which to get the connection * @param route the route for which to get the connection
* @param timeout the timeout, 0 or negative for no timeout * @param timeout the timeout, 0 or negative for no timeout
* @param tunit the unit for the {@code timeout}, * @param timeUnit the unit for the {@code timeout},
* may be {@code null} only if there is no timeout * may be {@code null} only if there is no timeout
* @param aborter an object which can abort a {@link WaitingThread}. * @param aborter an object which can abort a {@link WaitingThread}.
* *
@ -323,14 +323,14 @@ public class ConnPoolByRoute extends AbstractConnPool {
*/ */
protected BasicPoolEntry getEntryBlocking( protected BasicPoolEntry getEntryBlocking(
final HttpRoute route, final Object state, final HttpRoute route, final Object state,
final long timeout, final TimeUnit tunit, final long timeout, final TimeUnit timeUnit,
final WaitingThreadAborter aborter) final WaitingThreadAborter aborter)
throws ConnectionPoolTimeoutException, InterruptedException { throws ConnectionPoolTimeoutException, InterruptedException {
Date deadline = null; Date deadline = null;
if (timeout > 0) { if (timeout > 0) {
deadline = new Date deadline = new Date
(System.currentTimeMillis() + tunit.toMillis(timeout)); (System.currentTimeMillis() + timeUnit.toMillis(timeout));
} }
BasicPoolEntry entry = null; BasicPoolEntry entry = null;
@ -710,17 +710,17 @@ public class ConnPoolByRoute extends AbstractConnPool {
* *
* @param idletime the time the connections should have been idle * @param idletime the time the connections should have been idle
* in order to be closed now * in order to be closed now
* @param tunit the unit for the {@code idletime} * @param timeUnit the unit for the {@code idletime}
*/ */
@Override @Override
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit timeUnit) {
Args.notNull(tunit, "Time unit"); Args.notNull(timeUnit, "Time unit");
final long t = idletime > 0 ? idletime : 0; final long t = idletime > 0 ? idletime : 0;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Closing connections idle longer than " + t + " " + tunit); log.debug("Closing connections idle longer than " + t + " " + timeUnit);
} }
// the latest time for which connections will be closed // the latest time for which connections will be closed
final long deadline = System.currentTimeMillis() - tunit.toMillis(t); final long deadline = System.currentTimeMillis() - timeUnit.toMillis(t);
poolLock.lock(); poolLock.lock();
try { try {
final Iterator<BasicPoolEntry> iter = freeConnections.iterator(); final Iterator<BasicPoolEntry> iter = freeConnections.iterator();

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/PoolEntryRequest.java

@ -46,7 +46,7 @@ public interface PoolEntryRequest {
* an {@link InterruptedException} is thrown. * an {@link InterruptedException} is thrown.
* *
* @param timeout the timeout, 0 or negative for no timeout * @param timeout the timeout, 0 or negative for no timeout
* @param tunit the unit for the {@code timeout}, * @param timeUnit the unit for the {@code timeout},
* may be {@code null} only if there is no timeout * may be {@code null} only if there is no timeout
* *
* @return pool entry holding a connection for the route * @return pool entry holding a connection for the route
@ -58,7 +58,7 @@ public interface PoolEntryRequest {
*/ */
BasicPoolEntry getPoolEntry( BasicPoolEntry getPoolEntry(
long timeout, long timeout,
TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException; TimeUnit timeUnit) throws InterruptedException, ConnectionPoolTimeoutException;
/** /**
* Aborts the active or next call to * Aborts the active or next call to

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java

@ -31,7 +31,6 @@ import java.util.LinkedList;
import java.util.ListIterator; import java.util.ListIterator;
import java.util.Queue; import java.util.Queue;
import com.fr.third.org.apache.http.pool.AbstractConnPool;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
@ -49,7 +48,7 @@ import com.fr.third.org.apache.http.util.LangUtils;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.2) use {@link AbstractConnPool} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.pool.AbstractConnPool}
*/ */
@Deprecated @Deprecated
public class RouteSpecificPool { public class RouteSpecificPool {

16
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java

@ -29,8 +29,6 @@ package com.fr.third.org.apache.http.impl.conn.tsccm;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
@ -50,7 +48,7 @@ import com.fr.third.org.apache.http.util.Args;
import com.fr.third.org.apache.http.util.Asserts; import com.fr.third.org.apache.http.util.Asserts;
/** /**
* Manages a pool of {@link OperatedClientConnection } * Manages a pool of {@link com.fr.third.org.apache.http.conn.OperatedClientConnection }
* and is able to service connection requests from multiple execution threads. * and is able to service connection requests from multiple execution threads.
* Connections are pooled on a per route basis. A request for a route which * Connections are pooled on a per route basis. A request for a route which
* already the manager has persistent connections for available in the pool * already the manager has persistent connections for available in the pool
@ -67,7 +65,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.2) use {@link PoolingHttpClientConnectionManager} * @deprecated (4.2) use {@link com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager}
*/ */
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL) @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
@ -234,7 +232,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
@Override @Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) throws InterruptedException, final long timeout, final TimeUnit timeUnit) throws InterruptedException,
ConnectionPoolTimeoutException { ConnectionPoolTimeoutException {
Args.notNull(route, "Route"); Args.notNull(route, "Route");
@ -242,7 +240,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
log.debug("Get connection: " + route + ", timeout = " + timeout); log.debug("Get connection: " + route + ", timeout = " + timeout);
} }
final BasicPoolEntry entry = poolRequest.getPoolEntry(timeout, tunit); final BasicPoolEntry entry = poolRequest.getPoolEntry(timeout, timeUnit);
return new BasicPooledConnAdapter(ThreadSafeClientConnManager.this, entry); return new BasicPooledConnAdapter(ThreadSafeClientConnManager.this, entry);
} }
@ -329,11 +327,11 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
} }
@Override @Override
public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) { public void closeIdleConnections(final long idleTimeout, final TimeUnit timeUnit) {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit); log.debug("Closing connections idle longer than " + idleTimeout + " " + timeUnit);
} }
pool.closeIdleConnections(idleTimeout, tunit); pool.closeIdleConnections(idleTimeout, timeUnit);
} }
@Override @Override

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpec.java

@ -29,13 +29,12 @@ package com.fr.third.org.apache.http.impl.cookie;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec;
/** /**
* 'Meta' cookie specification that picks up a cookie policy based on * 'Meta' cookie specification that picks up a cookie policy based on
* the format of cookies sent with the HTTP response. * the format of cookies sent with the HTTP response.
* *
* @deprecated (4.4) use {@link DefaultCookieSpec}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec}.
* *
* @since 4.0 * @since 4.0
*/ */

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpecFactory.java

@ -39,11 +39,11 @@ import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that provides an instance of * {@link com.fr.third.org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of
* {@link BestMatchSpec}. The instance returned by this factory can * {@link com.fr.third.org.apache.http.impl.cookie.BestMatchSpec}. The instance returned by this factory can
* be shared by multiple threads. * be shared by multiple threads.
* *
* @deprecated (4.4) use {@link DefaultCookieSpecProvider}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpecProvider}.
* *
* @since 4.0 * @since 4.0
*/ */
@ -55,7 +55,7 @@ public class BestMatchSpecFactory implements CookieSpecFactory, CookieSpecProvid
public BestMatchSpecFactory(final String[] datepatterns, final boolean oneHeader) { public BestMatchSpecFactory(final String[] datepatterns, final boolean oneHeader) {
super(); super();
this.cookieSpec = new BestMatchSpec(datepatterns, oneHeader);; this.cookieSpec = new BestMatchSpec(datepatterns, oneHeader);
} }
public BestMatchSpecFactory() { public BestMatchSpecFactory() {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpec.java

@ -57,7 +57,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* common web browser applications such as Microsoft Internet Explorer * common web browser applications such as Microsoft Internet Explorer
* and Mozilla FireFox. * and Mozilla FireFox.
* *
* @deprecated (4.4) use {@link DefaultCookieSpec}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec}.
* *
* @since 4.0 * @since 4.0
*/ */

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java

@ -39,11 +39,11 @@ import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that provides an instance of * {@link com.fr.third.org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of
* {@link BrowserCompatSpec}. The instance returned by this factory * {@link com.fr.third.org.apache.http.impl.cookie.BrowserCompatSpec}. The instance returned by this factory
* can be shared by multiple threads. * can be shared by multiple threads.
* *
* @deprecated (4.4) use {@link DefaultCookieSpecProvider}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpecProvider}.
* *
* @since 4.0 * @since 4.0
*/ */

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatVersionAttributeHandler.java

@ -33,7 +33,6 @@ import com.fr.third.org.apache.http.cookie.ClientCookie;
import com.fr.third.org.apache.http.cookie.CommonCookieAttributeHandler; import com.fr.third.org.apache.http.cookie.CommonCookieAttributeHandler;
import com.fr.third.org.apache.http.cookie.MalformedCookieException; import com.fr.third.org.apache.http.cookie.MalformedCookieException;
import com.fr.third.org.apache.http.cookie.SetCookie; import com.fr.third.org.apache.http.cookie.SetCookie;
import com.fr.third.org.apache.http.impl.cookie.AbstractCookieAttributeHandler;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/IgnoreSpecFactory.java

@ -32,15 +32,13 @@ import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.impl.cookie.IgnoreSpec;
import com.fr.third.org.apache.http.impl.cookie.IgnoreSpecProvider;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that ignores all cookies. * {@link CookieSpecProvider} implementation that ignores all cookies.
* *
* @deprecated (4.4) Use {@link IgnoreSpecProvider}. * @deprecated (4.4) Use {@link com.fr.third.org.apache.http.impl.cookie.IgnoreSpecProvider}.
* *
* @since 4.1 * @since 4.1
*/ */

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java

@ -35,17 +35,15 @@ import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames; import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.impl.cookie.NetscapeDraftSpec;
import com.fr.third.org.apache.http.impl.cookie.NetscapeDraftSpecProvider;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that provides an instance of * {@link com.fr.third.org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of
* {@link NetscapeDraftSpec}. The instance returned by this factory * {@link com.fr.third.org.apache.http.impl.cookie.NetscapeDraftSpec}. The instance returned by this factory
* can be shared by multiple threads. * can be shared by multiple threads.
* *
* @deprecated (4.4) Use {@link NetscapeDraftSpecProvider}. * @deprecated (4.4) Use {@link com.fr.third.org.apache.http.impl.cookie.NetscapeDraftSpecProvider}.
* *
* @since 4.0 * @since 4.0
*/ */

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/PublicSuffixFilter.java

@ -34,7 +34,6 @@ import com.fr.third.org.apache.http.cookie.CookieAttributeHandler;
import com.fr.third.org.apache.http.cookie.CookieOrigin; import com.fr.third.org.apache.http.cookie.CookieOrigin;
import com.fr.third.org.apache.http.cookie.MalformedCookieException; import com.fr.third.org.apache.http.cookie.MalformedCookieException;
import com.fr.third.org.apache.http.cookie.SetCookie; import com.fr.third.org.apache.http.cookie.SetCookie;
import com.fr.third.org.apache.http.impl.cookie.PublicSuffixDomainFilter;
/** /**
* Wraps a CookieAttributeHandler and leverages its match method * Wraps a CookieAttributeHandler and leverages its match method
@ -44,7 +43,7 @@ import com.fr.third.org.apache.http.impl.cookie.PublicSuffixDomainFilter;
* An uptodate list of suffixes can be obtained from * An uptodate list of suffixes can be obtained from
* <a href="http://publicsuffix.org/">publicsuffix.org</a> * <a href="http://publicsuffix.org/">publicsuffix.org</a>
* *
* @deprecated (4.4) use {@link PublicSuffixDomainFilter} * @deprecated (4.4) use {@link com.fr.third.org.apache.http.impl.cookie.PublicSuffixDomainFilter}
* *
* @since 4.0 * @since 4.0
*/ */

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2109SpecFactory.java

@ -35,17 +35,15 @@ import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames; import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.impl.cookie.RFC2109Spec;
import com.fr.third.org.apache.http.impl.cookie.RFC2109SpecProvider;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that provides an instance of * {@link com.fr.third.org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of
* {@link RFC2109Spec}. The instance returned by this factory * {@link com.fr.third.org.apache.http.impl.cookie.RFC2109Spec}. The instance returned by this factory
* can be shared by multiple threads. * can be shared by multiple threads.
* *
* @deprecated (4.4) Use {@link RFC2109SpecProvider}. * @deprecated (4.4) Use {@link com.fr.third.org.apache.http.impl.cookie.RFC2109SpecProvider}.
* *
* @since 4.0 * @since 4.0
*/ */

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2965SpecFactory.java

@ -35,17 +35,15 @@ import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames; import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.impl.cookie.RFC2965Spec;
import com.fr.third.org.apache.http.impl.cookie.RFC2965SpecProvider;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* {@link CookieSpecProvider} implementation that provides an instance of * {@link com.fr.third.org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of
* {@link RFC2965Spec}. The instance returned by this factory can * {@link com.fr.third.org.apache.http.impl.cookie.RFC2965Spec}. The instance returned by this factory can
* be shared by multiple threads. * be shared by multiple threads.
* *
* @deprecated (4.4) Use {@link RFC2965SpecProvider}. * @deprecated (4.4) Use {@link com.fr.third.org.apache.http.impl.cookie.RFC2965SpecProvider}.
* *
* @since 4.0 * @since 4.0
*/ */

3
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScheme.java

@ -26,7 +26,6 @@
*/ */
package com.fr.third.org.apache.http.auth; package com.fr.third.org.apache.http.auth;
import com.fr.third.org.apache.http.protocol.HttpContext;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
@ -122,7 +121,7 @@ public interface AuthScheme {
* *
* @return the authorization string * @return the authorization string
* *
* @deprecated (4.1) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, HttpContext)} * @deprecated (4.1) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, com.fr.third.org.apache.http.protocol.HttpContext)}
*/ */
@Deprecated @Deprecated
Header authenticate(Credentials credentials, HttpRequest request) Header authenticate(Credentials credentials, HttpRequest request)

6
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthSchemeRegistry.java

@ -32,7 +32,6 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import com.fr.third.org.apache.http.config.Registry;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
@ -48,7 +47,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link Registry} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.config.Registry}
*/ */
@Contract(threading = ThreadingBehavior.SAFE) @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
@ -113,9 +112,8 @@ public final class AuthSchemeRegistry implements Lookup<AuthSchemeProvider> {
final AuthSchemeFactory factory = registeredSchemes.get(name.toLowerCase(Locale.ENGLISH)); final AuthSchemeFactory factory = registeredSchemes.get(name.toLowerCase(Locale.ENGLISH));
if (factory != null) { if (factory != null) {
return factory.newInstance(params); return factory.newInstance(params);
} else {
throw new IllegalStateException("Unsupported authentication scheme: " + name);
} }
throw new IllegalStateException("Unsupported authentication scheme: " + name);
} }
/** /**

6
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScope.java

@ -265,7 +265,7 @@ public class AuthScope {
} }
/** /**
* @see java.lang.Object#equals(Object) * @see Object#equals(Object)
*/ */
@Override @Override
public boolean equals(final Object o) { public boolean equals(final Object o) {
@ -287,7 +287,7 @@ public class AuthScope {
} }
/** /**
* @see java.lang.Object#toString() * @see Object#toString()
*/ */
@Override @Override
public String toString() { public String toString() {
@ -315,7 +315,7 @@ public class AuthScope {
} }
/** /**
* @see java.lang.Object#hashCode() * @see Object#hashCode()
*/ */
@Override @Override
public int hashCode() { public int hashCode() {

9
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthState.java

@ -133,6 +133,15 @@ public class AuthState {
return this.authOptions != null && !this.authOptions.isEmpty(); return this.authOptions != null && !this.authOptions.isEmpty();
} }
/**
* Returns {@code true} if the actual authentication scheme is connection based.
*
* @since 4.5.6
*/
public boolean isConnectionBased() {
return this.authScheme != null && this.authScheme.isConnectionBased();
}
/** /**
* Updates the auth state with a queue of {@link AuthOption}s. * Updates the auth state with a queue of {@link AuthOption}s.
* *

19
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/params/AuthPNames.java

@ -27,26 +27,21 @@
package com.fr.third.org.apache.http.auth.params; package com.fr.third.org.apache.http.auth.params;
import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.client.config.RequestConfig;
/** /**
* Parameter names for HTTP authentication classes. * Parameter names for HTTP authentication classes.
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use {@link RequestConfig} * @deprecated (4.3) use {@link com.fr.third.org.apache.http.client.config.RequestConfig}
* and constructor parameters of * and constructor parameters of
* {@link AuthSchemeProvider}s. * {@link com.fr.third.org.apache.http.auth.AuthSchemeProvider}s.
*/ */
@Deprecated @Deprecated
public interface AuthPNames { public interface AuthPNames {
/** /**
* Defines the charset to be used when encoding * Defines the charset to be used when encoding
* {@link Credentials}. * {@link com.fr.third.org.apache.http.auth.Credentials}.
* <p> * <p>
* This parameter expects a value of type {@link String}. * This parameter expects a value of type {@link String}.
*/ */
@ -54,25 +49,25 @@ public interface AuthPNames {
/** /**
* Defines the order of preference for supported * Defines the order of preference for supported
* {@link AuthScheme}s when authenticating with * {@link com.fr.third.org.apache.http.auth.AuthScheme}s when authenticating with
* the target host. * the target host.
* <p> * <p>
* This parameter expects a value of type {@link java.util.Collection}. The * This parameter expects a value of type {@link java.util.Collection}. The
* collection is expected to contain {@link String} instances representing * collection is expected to contain {@link String} instances representing
* a name of an authentication scheme as returned by * a name of an authentication scheme as returned by
* {@link AuthScheme#getSchemeName()}. * {@link com.fr.third.org.apache.http.auth.AuthScheme#getSchemeName()}.
*/ */
public static final String TARGET_AUTH_PREF = "http.auth.target-scheme-pref"; public static final String TARGET_AUTH_PREF = "http.auth.target-scheme-pref";
/** /**
* Defines the order of preference for supported * Defines the order of preference for supported
* {@link AuthScheme}s when authenticating with the * {@link com.fr.third.org.apache.http.auth.AuthScheme}s when authenticating with the
* proxy host. * proxy host.
* <p> * <p>
* This parameter expects a value of type {@link java.util.Collection}. The * This parameter expects a value of type {@link java.util.Collection}. The
* collection is expected to contain {@link String} instances representing * collection is expected to contain {@link String} instances representing
* a name of an authentication scheme as returned by * a name of an authentication scheme as returned by
* {@link AuthScheme#getSchemeName()}. * {@link com.fr.third.org.apache.http.auth.AuthScheme#getSchemeName()}.
*/ */
public static final String PROXY_AUTH_PREF = "http.auth.proxy-scheme-pref"; public static final String PROXY_AUTH_PREF = "http.auth.proxy-scheme-pref";

2
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/CookieStore.java

@ -57,7 +57,7 @@ public interface CookieStore {
/** /**
* Removes all of {@link Cookie}s in this store that have expired by * Removes all of {@link Cookie}s in this store that have expired by
* the specified {@link java.util.Date}. * the specified {@link Date}.
* *
* @return true if any cookies were purged. * @return true if any cookies were purged.
*/ */

10
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/HttpClient.java

@ -27,18 +27,16 @@
package com.fr.third.org.apache.http.client; package com.fr.third.org.apache.http.client;
import java.io.IOException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.methods.HttpUriRequest; import com.fr.third.org.apache.http.client.methods.HttpUriRequest;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.impl.client.HttpClientBuilder;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.org.apache.http.protocol.HttpContext;
import java.io.IOException;
/** /**
* This interface represents only the most basic contract for HTTP request * This interface represents only the most basic contract for HTTP request
* execution. It imposes no restrictions or particular details on the request * execution. It imposes no restrictions or particular details on the request
@ -60,7 +58,7 @@ public interface HttpClient {
* @return the default parameters * @return the default parameters
* *
* @deprecated (4.3) use * @deprecated (4.3) use
* {@link RequestConfig}. * {@link com.fr.third.org.apache.http.client.config.RequestConfig}.
*/ */
@Deprecated @Deprecated
HttpParams getParams(); HttpParams getParams();
@ -71,7 +69,7 @@ public interface HttpClient {
* @return the connection manager * @return the connection manager
* *
* @deprecated (4.3) use * @deprecated (4.3) use
* {@link HttpClientBuilder}. * {@link com.fr.third.org.apache.http.impl.client.HttpClientBuilder}.
*/ */
@Deprecated @Deprecated
ClientConnectionManager getConnectionManager(); ClientConnectionManager getConnectionManager();

13
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/HttpResponseException.java

@ -26,6 +26,8 @@
*/ */
package com.fr.third.org.apache.http.client; package com.fr.third.org.apache.http.client;
import com.fr.third.org.apache.http.util.TextUtils;
/** /**
* Signals a non 2xx HTTP response. * Signals a non 2xx HTTP response.
* *
@ -36,14 +38,21 @@ public class HttpResponseException extends ClientProtocolException {
private static final long serialVersionUID = -7186627969477257933L; private static final long serialVersionUID = -7186627969477257933L;
private final int statusCode; private final int statusCode;
private final String reasonPhrase;
public HttpResponseException(final int statusCode, final String s) { public HttpResponseException(final int statusCode, final String reasonPhrase) {
super(s); super(String.format("status code: %d" +
(TextUtils.isBlank(reasonPhrase) ? "" : ", reason phrase: %s"), statusCode, reasonPhrase));
this.statusCode = statusCode; this.statusCode = statusCode;
this.reasonPhrase = reasonPhrase;
} }
public int getStatusCode() { public int getStatusCode() {
return this.statusCode; return this.statusCode;
} }
public String getReasonPhrase() {
return this.reasonPhrase;
}
} }

5
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/config/AuthSchemes.java

@ -65,6 +65,11 @@ public final class AuthSchemes {
*/ */
public static final String KERBEROS = "Kerberos"; public static final String KERBEROS = "Kerberos";
/**
* CredSSP authentication scheme defined in [MS-CSSP].
*/
public static final String CREDSSP = "CredSSP";
private AuthSchemes() { private AuthSchemes() {
} }

52
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/config/RequestConfig.java

@ -33,7 +33,6 @@ import java.util.Collection;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.Contract; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
/** /**
* Immutable class encapsulating request configuration items. * Immutable class encapsulating request configuration items.
@ -61,12 +60,13 @@ public class RequestConfig implements Cloneable {
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(
@ -85,7 +85,8 @@ public class RequestConfig implements Cloneable {
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;
@ -103,6 +104,7 @@ public class RequestConfig implements Cloneable {
this.connectTimeout = connectTimeout; this.connectTimeout = connectTimeout;
this.socketTimeout = socketTimeout; this.socketTimeout = socketTimeout;
this.contentCompressionEnabled = contentCompressionEnabled; this.contentCompressionEnabled = contentCompressionEnabled;
this.normalizeUri = normalizeUri;
} }
/** /**
@ -166,7 +168,7 @@ public class RequestConfig implements Cloneable {
* </p> * </p>
* *
* @deprecated (4.4) Use {@link * @deprecated (4.4) Use {@link
* PoolingHttpClientConnectionManager#getValidateAfterInactivity()} * com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager#getValidateAfterInactivity()}
*/ */
@Deprecated @Deprecated
public boolean isStaleConnectionCheckEnabled() { public boolean isStaleConnectionCheckEnabled() {
@ -262,11 +264,10 @@ public class RequestConfig implements Cloneable {
/** /**
* Returns the timeout in milliseconds used when requesting a connection * Returns the timeout in milliseconds used when requesting a connection
* from the connection manager. A timeout value of zero is interpreted * from the connection manager.
* as an infinite timeout.
* <p> * <p>
* A timeout value of zero is interpreted as an infinite timeout. * A timeout value of zero is interpreted as an infinite timeout.
* A negative value is interpreted as undefined (system default). * A negative value is interpreted as undefined (system default if applicable).
* </p> * </p>
* <p> * <p>
* Default: {@code -1} * Default: {@code -1}
@ -278,10 +279,9 @@ public class RequestConfig implements Cloneable {
/** /**
* Determines the timeout in milliseconds until a connection is established. * Determines the timeout in milliseconds until a connection is established.
* A timeout value of zero is interpreted as an infinite timeout.
* <p> * <p>
* A timeout value of zero is interpreted as an infinite timeout. * A timeout value of zero is interpreted as an infinite timeout.
* A negative value is interpreted as undefined (system default). * A negative value is interpreted as undefined (system default if applicable).
* </p> * </p>
* <p> * <p>
* Default: {@code -1} * Default: {@code -1}
@ -297,7 +297,7 @@ public class RequestConfig implements Cloneable {
* a maximum period inactivity between two consecutive data packets). * a maximum period inactivity between two consecutive data packets).
* <p> * <p>
* A timeout value of zero is interpreted as an infinite timeout. * A timeout value of zero is interpreted as an infinite timeout.
* A negative value is interpreted as undefined (system default). * A negative value is interpreted as undefined (system default if applicable).
* </p> * </p>
* <p> * <p>
* Default: {@code -1} * Default: {@code -1}
@ -333,6 +333,18 @@ public class RequestConfig implements Cloneable {
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();
@ -357,16 +369,17 @@ public class RequestConfig implements Cloneable {
builder.append(", connectTimeout=").append(connectTimeout); builder.append(", connectTimeout=").append(connectTimeout);
builder.append(", socketTimeout=").append(socketTimeout); builder.append(", socketTimeout=").append(socketTimeout);
builder.append(", contentCompressionEnabled=").append(contentCompressionEnabled); builder.append(", contentCompressionEnabled=").append(contentCompressionEnabled);
builder.append(", normalizeUri=").append(normalizeUri);
builder.append("]"); builder.append("]");
return builder.toString(); return builder.toString();
} }
public static RequestConfig.Builder custom() { public static Builder custom() {
return new Builder(); return new Builder();
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static RequestConfig.Builder copy(final RequestConfig config) { public static Builder copy(final RequestConfig config) {
return new Builder() return new Builder()
.setExpectContinueEnabled(config.isExpectContinueEnabled()) .setExpectContinueEnabled(config.isExpectContinueEnabled())
.setProxy(config.getProxy()) .setProxy(config.getProxy())
@ -384,7 +397,8 @@ public class RequestConfig implements Cloneable {
.setConnectTimeout(config.getConnectTimeout()) .setConnectTimeout(config.getConnectTimeout())
.setSocketTimeout(config.getSocketTimeout()) .setSocketTimeout(config.getSocketTimeout())
.setDecompressionEnabled(config.isDecompressionEnabled()) .setDecompressionEnabled(config.isDecompressionEnabled())
.setContentCompressionEnabled(config.isContentCompressionEnabled()); .setContentCompressionEnabled(config.isContentCompressionEnabled())
.setNormalizeUri(config.isNormalizeUri());
} }
public static class Builder { public static class Builder {
@ -405,6 +419,7 @@ public class RequestConfig implements Cloneable {
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();
@ -417,6 +432,7 @@ public class RequestConfig implements Cloneable {
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 expectContinueEnabled) { public Builder setExpectContinueEnabled(final boolean expectContinueEnabled) {
@ -436,7 +452,7 @@ public class RequestConfig implements Cloneable {
/** /**
* @deprecated (4.4) Use {@link * @deprecated (4.4) Use {@link
* PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)} * com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)}
*/ */
@Deprecated @Deprecated
public Builder setStaleConnectionCheckEnabled(final boolean staleConnectionCheckEnabled) { public Builder setStaleConnectionCheckEnabled(final boolean staleConnectionCheckEnabled) {
@ -514,6 +530,11 @@ public class RequestConfig implements Cloneable {
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,
@ -531,7 +552,8 @@ public class RequestConfig implements Cloneable {
connectionRequestTimeout, connectionRequestTimeout,
connectTimeout, connectTimeout,
socketTimeout, socketTimeout,
contentCompressionEnabled); contentCompressionEnabled,
normalizeUri);
} }
} }

15
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DecompressingEntity.java

@ -79,23 +79,22 @@ public class DecompressingEntity extends HttpEntityWrapper {
content = getDecompressingStream(); content = getDecompressingStream();
} }
return content; return content;
} else {
return getDecompressingStream();
} }
return getDecompressingStream();
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
Args.notNull(outstream, "Output stream"); Args.notNull(outStream, "Output stream");
final InputStream instream = getContent(); final InputStream inStream = getContent();
try { try {
final byte[] buffer = new byte[BUFFER_SIZE]; final byte[] buffer = new byte[BUFFER_SIZE];
int l; int l;
while ((l = instream.read(buffer)) != -1) { while ((l = inStream.read(buffer)) != -1) {
outstream.write(buffer, 0, l); outStream.write(buffer, 0, l);
} }
} finally { } finally {
instream.close(); inStream.close();
} }
} }

15
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DeflateDecompressingEntity.java

@ -26,14 +26,10 @@
*/ */
package com.fr.third.org.apache.http.client.entity; package com.fr.third.org.apache.http.client.entity;
import java.io.IOException;
import java.io.InputStream;
import com.fr.third.org.apache.http.entity.HttpEntityWrapper;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
/** /**
* {@link HttpEntityWrapper} responsible for handling * {@link com.fr.third.org.apache.http.entity.HttpEntityWrapper} responsible for handling
* deflate Content Coded responses. In RFC2616 terms, {@code deflate} * deflate Content Coded responses. In RFC2616 terms, {@code deflate}
* means a {@code zlib} stream as defined in RFC1950. Some server * means a {@code zlib} stream as defined in RFC1950. Some server
* implementations have misinterpreted RFC2616 to mean that a * implementations have misinterpreted RFC2616 to mean that a
@ -58,14 +54,7 @@ public class DeflateDecompressingEntity extends DecompressingEntity {
* a non-null {@link HttpEntity} to be wrapped * a non-null {@link HttpEntity} to be wrapped
*/ */
public DeflateDecompressingEntity(final HttpEntity entity) { public DeflateDecompressingEntity(final HttpEntity entity) {
super(entity, new InputStreamFactory() { super(entity, DeflateInputStreamFactory.getInstance());
@Override
public InputStream create(final InputStream instream) throws IOException {
return new DeflateInputStream(instream);
}
});
} }
} }

63
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/DeflateInputStreamFactory.java

@ -0,0 +1,63 @@
/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package com.fr.third.org.apache.http.client.entity;
import java.io.IOException;
import java.io.InputStream;
import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
/**
* {@link InputStreamFactory} for handling Deflate Content Coded responses.
*
* @since 4.5.4
*/
@Contract(threading = ThreadingBehavior.IMMUTABLE)
public class DeflateInputStreamFactory implements InputStreamFactory {
/**
* Singleton instance.
*/
private static final DeflateInputStreamFactory INSTANCE = new DeflateInputStreamFactory();
/**
* Gets the singleton instance.
*
* @return the singleton instance.
*/
public static DeflateInputStreamFactory getInstance() {
return INSTANCE;
}
@Override
public InputStream create(final InputStream inputStream) throws IOException {
return new DeflateInputStream(inputStream);
}
}

131
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/client/entity/EntityBuilder.java

@ -53,11 +53,11 @@ import com.fr.third.org.apache.http.entity.StringEntity;
* <ul> * <ul>
* <li>{@link #setText(String)}</li> * <li>{@link #setText(String)}</li>
* <li>{@link #setBinary(byte[])}</li> * <li>{@link #setBinary(byte[])}</li>
* <li>{@link #setStream(java.io.InputStream)}</li> * <li>{@link #setStream(InputStream)}</li>
* <li>{@link #setSerializable(java.io.Serializable)}</li> * <li>{@link #setSerializable(Serializable)}</li>
* <li>{@link #setParameters(java.util.List)}</li> * <li>{@link #setParameters(List)}</li>
* <li>{@link #setParameters(NameValuePair...)}</li> * <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setFile(java.io.File)}</li> * <li>{@link #setFile(File)}</li>
* </ul> * </ul>
* *
* @since 4.3 * @since 4.3
@ -100,13 +100,15 @@ public class EntityBuilder {
} }
/** /**
* Sets entity content as a string. This method is mutually exclusive with * Sets entity content as a string. This method is mutually exclusive with:
* {@link #setBinary(byte[])}, * <ul>
* {@link #setStream(java.io.InputStream)} , * <li>{@link #setBinary(byte[])}</li>
* {@link #setSerializable(java.io.Serializable)} , * <li>{@link #setStream(InputStream)}</li>
* {@link #setParameters(java.util.List)}, * <li>{@link #setSerializable(Serializable)}</li>
* {@link #setParameters(NameValuePair...)} * <li>{@link #setParameters(List)}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setText(final String text) { public EntityBuilder setText(final String text) {
clearContent(); clearContent();
@ -123,13 +125,16 @@ public class EntityBuilder {
} }
/** /**
* Sets entity content as a byte array. This method is mutually exclusive with * Sets entity content as a byte array. This method is mutually exclusive
* {@link #setText(String)}, * with:
* {@link #setStream(java.io.InputStream)} , * <ul>
* {@link #setSerializable(java.io.Serializable)} , * <li>{@link #setText(String)}</li>
* {@link #setParameters(java.util.List)}, * <li>{@link #setStream(InputStream)}</li>
* {@link #setParameters(NameValuePair...)} * <li>{@link #setSerializable(Serializable)}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setParameters(List)}</li>
* <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setBinary(final byte[] binary) { public EntityBuilder setBinary(final byte[] binary) {
clearContent(); clearContent();
@ -139,20 +144,23 @@ public class EntityBuilder {
/** /**
* Returns entity content as a {@link InputStream} if set using * Returns entity content as a {@link InputStream} if set using
* {@link #setStream(java.io.InputStream)} method. * {@link #setStream(InputStream)} method.
*/ */
public InputStream getStream() { public InputStream getStream() {
return stream; return stream;
} }
/** /**
* Sets entity content as a {@link InputStream}. This method is mutually exclusive with * Sets entity content as a {@link InputStream}. This method is mutually
* {@link #setText(String)}, * exclusive with:
* {@link #setBinary(byte[])}, * <ul>
* {@link #setSerializable(java.io.Serializable)} , * <li>{@link #setText(String)}</li>
* {@link #setParameters(java.util.List)}, * <li>{@link #setBinary(byte[])}</li>
* {@link #setParameters(NameValuePair...)} * <li>{@link #setSerializable(Serializable)}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setParameters(List)}</li>
* <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setStream(final InputStream stream) { public EntityBuilder setStream(final InputStream stream) {
clearContent(); clearContent();
@ -162,20 +170,23 @@ public class EntityBuilder {
/** /**
* Returns entity content as a parameter list if set using * Returns entity content as a parameter list if set using
* {@link #setParameters(java.util.List)} or * {@link #setParameters(List)} or
* {@link #setParameters(NameValuePair...)} methods. * {@link #setParameters(org.apache.http.NameValuePair...)} methods.
*/ */
public List<NameValuePair> getParameters() { public List<NameValuePair> getParameters() {
return parameters; return parameters;
} }
/** /**
* Sets entity content as a parameter list. This method is mutually exclusive with * Sets entity content as a parameter list. This method is mutually
* {@link #setText(String)}, * exclusive with:
* {@link #setBinary(byte[])}, * <ul>
* {@link #setStream(java.io.InputStream)} , * <li>{@link #setText(String)}</li>
* {@link #setSerializable(java.io.Serializable)} , * <li>{@link #setBinary(byte[])}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setStream(InputStream)}</li>
* <li>{@link #setSerializable(Serializable)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setParameters(final List<NameValuePair> parameters) { public EntityBuilder setParameters(final List<NameValuePair> parameters) {
clearContent(); clearContent();
@ -184,12 +195,14 @@ public class EntityBuilder {
} }
/** /**
* Sets entity content as a parameter list. This method is mutually exclusive with * Sets entity content as a parameter list. This method is mutually exclusive with:
* {@link #setText(String)}, * <ul>
* {@link #setBinary(byte[])}, * <li>{@link #setText(String)}</li>
* {@link #setStream(java.io.InputStream)} , * <li>{@link #setBinary(byte[])}</li>
* {@link #setSerializable(java.io.Serializable)} , * <li>{@link #setStream(InputStream)}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setSerializable(Serializable)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setParameters(final NameValuePair... parameters) { public EntityBuilder setParameters(final NameValuePair... parameters) {
return setParameters(Arrays.asList(parameters)); return setParameters(Arrays.asList(parameters));
@ -197,20 +210,22 @@ public class EntityBuilder {
/** /**
* Returns entity content as a {@link Serializable} if set using * Returns entity content as a {@link Serializable} if set using
* {@link #setSerializable(java.io.Serializable)} method. * {@link #setSerializable(Serializable)} method.
*/ */
public Serializable getSerializable() { public Serializable getSerializable() {
return serializable; return serializable;
} }
/** /**
* Sets entity content as a {@link Serializable}. This method is mutually exclusive with * Sets entity content as a {@link Serializable}. This method is mutually exclusive with:
* {@link #setText(String)}, * <ul>
* {@link #setBinary(byte[])}, * <li>{@link #setText(String)}</li>
* {@link #setStream(java.io.InputStream)} , * <li>{@link #setBinary(byte[])}</li>
* {@link #setParameters(java.util.List)}, * <li>{@link #setStream(InputStream)}</li>
* {@link #setParameters(NameValuePair...)} * <li>{@link #setParameters(List)}</li>
* {@link #setFile(java.io.File)} methods. * <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setFile(File)}</li>
* </ul>
*/ */
public EntityBuilder setSerializable(final Serializable serializable) { public EntityBuilder setSerializable(final Serializable serializable) {
clearContent(); clearContent();
@ -220,20 +235,22 @@ public class EntityBuilder {
/** /**
* Returns entity content as a {@link File} if set using * Returns entity content as a {@link File} if set using
* {@link #setFile(java.io.File)} method. * {@link #setFile(File)} method.
*/ */
public File getFile() { public File getFile() {
return file; return file;
} }
/** /**
* Sets entity content as a {@link File}. This method is mutually exclusive with * Sets entity content as a {@link File}. This method is mutually exclusive with:
* {@link #setText(String)}, * <ul>
* {@link #setBinary(byte[])}, * <li>{@link #setText(String)}</li>
* {@link #setStream(java.io.InputStream)} , * <li>{@link #setBinary(byte[])}</li>
* {@link #setParameters(java.util.List)}, * <li>{@link #setStream(InputStream)}</li>
* {@link #setParameters(NameValuePair...)} * <li>{@link #setParameters(List)}</li>
* {@link #setSerializable(java.io.Serializable)} methods. * <li>{@link #setParameters(org.apache.http.NameValuePair...)}</li>
* <li>{@link #setSerializable(Serializable)}</li>
* </ul>
*/ */
public EntityBuilder setFile(final File file) { public EntityBuilder setFile(final File file) {
clearContent(); clearContent();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save