You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2016/01/31 22:43:27 UTC
svn commit: r1727859 - in /httpcomponents/httpcore/trunk: RELEASE_NOTES.txt
httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java
Author: ggregory
Date: Sun Jan 31 21:43:26 2016
New Revision: 1727859
URL: http://svn.apache.org/viewvc?rev=1727859&view=rev
Log:
HTTPCORE-418: Add a HttpHost constructor for hostname and scheme.
Modified:
httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java
Modified: httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?rev=1727859&r1=1727858&r2=1727859&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Sun Jan 31 21:43:26 2016
@@ -1,4 +1,4 @@
-Release 5.0-ALPHA1
+Release 5.0-ALPHA2
-------------------
This is a major release that renders HttpCore API incompatible with the stable 4.x branch
@@ -25,6 +25,39 @@ Please note that at this point 5.0 APIs
expected to change in the coming releases without providing a migration path.
+Changelog
+-------------------
+
+* HTTPCORE-418: Add a HttpHost constructor for hostname and scheme.
+ Based on contribution by Joshua Hendrickson <joshua dot hendrickson at live dot com>
+
+
+Release 5.0-ALPHA1
+-------------------
+
+This is a major release that renders HttpCore API incompatible with the stable 4.x branch
+and upgrades HTTP/1.1 protocol conformance to the requirements and recommendations of the latest
+protocol specification. This release lays the foundation for transition to HTTP/2 as the primary
+transport protocol in the future releases.
+
+Notable changes and features included in the 5.0 series are:
+
+* Improved conformance to requirements and recommendations of the latest HTTP/1.1 protocol
+ specification (RFC 7230, RFC 7231)
+
+* Blocking I/O and NIO HTTP transport implementation has been folded into one module
+
+* Package name space changed to 'org.apache.hc.core5'
+
+* Maven group id changed to 'org.apache.httpcomponents.core5'
+
+HttpCore 5.0 releases can be co-located with earlier versions.
+
+Please note that as of 5.0 HttpCore requires Java 1.7 or newer.
+
+Please note that at this point 5.0 APIs are considered API experimental and unstable and are
+expected to change in the coming releases without providing a migration path.
+
Changelog
-------------------
Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java?rev=1727859&r1=1727858&r2=1727859&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java Sun Jan 31 21:43:26 2016
@@ -99,6 +99,18 @@ public final class HttpHost implements S
}
/**
+ * Creates {@code HttpHost} instance with the given hostname and scheme and the default port for that scheme.
+ *
+ * @param hostname the hostname (IP or DNS name)
+ * @param scheme the name of the scheme.
+ * {@code null} indicates the
+ * {@link #DEFAULT_SCHEME_NAME default scheme}
+ */
+ public HttpHost(final String hostname, final String scheme) {
+ this(hostname, -1, scheme);
+ }
+
+ /**
* Creates {@code HttpHost} instance from string. Text may not contain any blanks.
*
* @since 4.4
Modified: httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java?rev=1727859&r1=1727858&r2=1727859&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/http/TestHttpHost.java Sun Jan 31 21:43:26 2016
@@ -60,6 +60,10 @@ public class TestHttpHost {
Assert.assertEquals("somehost", host4.getHostName());
Assert.assertEquals(443, host4.getPort());
Assert.assertEquals("https", host4.getSchemeName());
+ final HttpHost host5 = new HttpHost("somehost", "https");
+ Assert.assertEquals("somehost", host5.getHostName());
+ Assert.assertEquals(-1, host5.getPort());
+ Assert.assertEquals("https", host5.getSchemeName());
try {
new HttpHost((String) null, -1, null);
Assert.fail("IllegalArgumentException should have been thrown");