You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/06 18:30:37 UTC
svn commit: r1794171 - in /httpcomponents/httpclient/trunk:
httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/
httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/
Author: olegk
Date: Sat May 6 18:30:37 2017
New Revision: 1794171
URL: http://svn.apache.org/viewvc?rev=1794171&view=rev
Log:
Fixed processing of HTTP protocol version dependent request headers
Removed:
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/NoopHttpProcessor.java
Modified:
httpcomponents/httpclient/trunk/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
Modified: httpcomponents/httpclient/trunk/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java?rev=1794171&r1=1794170&r2=1794171&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java Sat May 6 18:30:37 2017
@@ -81,13 +81,13 @@ public class HttpAsyncClientCompatibilit
new HttpAsyncClientCompatibilityTest(
HttpVersion.HTTP_1_1,
new HttpHost("test-httpd", 8443, "https"), new HttpHost("localhost", 8889),
- new UsernamePasswordCredentials("squid", "nopassword".toCharArray()))
-// new HttpAsyncClientCompatibilityTest(
-// HttpVersion.HTTP_2_0,
-// new HttpHost("localhost", 8080, "http"), null, null),
-// new HttpAsyncClientCompatibilityTest(
-// HttpVersion.HTTP_2_0,
-// new HttpHost("localhost", 8443, "https"), null, null)
+ new UsernamePasswordCredentials("squid", "nopassword".toCharArray())),
+ new HttpAsyncClientCompatibilityTest(
+ HttpVersion.HTTP_2_0,
+ new HttpHost("localhost", 8080, "http"), null, null),
+ new HttpAsyncClientCompatibilityTest(
+ HttpVersion.HTTP_2_0,
+ new HttpHost("localhost", 8443, "https"), null, null)
};
for (final HttpAsyncClientCompatibilityTest test: tests) {
try {
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java?rev=1794171&r1=1794170&r2=1794171&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java Sat May 6 18:30:37 2017
@@ -760,9 +760,6 @@ public class HttpAsyncClientBuilder {
}
b.addAll(
new RequestDefaultHeaders(defaultHeaders),
- new H2RequestContent(),
- new H2RequestTargetHost(),
- new H2RequestConnControl(),
new RequestUserAgent(userAgentCopy),
new RequestExpectContinue());
if (!cookieManagementDisabled) {
@@ -875,7 +872,7 @@ public class HttpAsyncClientBuilder {
}
final AsyncPushConsumerRegistry pushConsumerRegistry = new AsyncPushConsumerRegistry();
final IOEventHandlerFactory ioEventHandlerFactory = new HttpAsyncClientEventHandlerFactory(
- NoopHttpProcessor.INSTANCE,
+ new DefaultHttpProcessor(new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl()),
new HandlerFactory<AsyncPushConsumer>() {
@Override