[Git][java-team/httpcomponents-core][upstream] New upstream version 4.4.15
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Mon May 2 17:29:12 BST 2022
Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / httpcomponents-core
Commits:
ca545977 by Emmanuel Bourg at 2022-05-02T18:26:13+02:00
New upstream version 4.4.15
- - - - -
15 changed files:
- RELEASE_NOTES.txt
- httpcore-ab/pom.xml
- httpcore-nio/pom.xml
- httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
- httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
- httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java
- httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java
- httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
- httpcore-osgi/pom.xml
- httpcore/pom.xml
- httpcore/src/main/java/org/apache/http/HttpStatus.java
- httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
- httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
- httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java
- pom.xml
Changes:
=====================================
RELEASE_NOTES.txt
=====================================
@@ -1,3 +1,25 @@
+Release 4.4.15
+-------------------
+
+This is a maintenance release that corrects a number of defects discovered since release 4.4.14.
+
+Changelog
+-------------------
+
+* HTTPCORE-695: Unhandled CancelledKeyException during processPendingInterestOps leads to
+ a shutdown of the underlying IOReactor.
+ Contributed by Kurtcebe Eroglu <kurtcebe.eroglu at gmail.com>
+
+* HTTPCORE-687: Non-blocking SSL I/O session can enter a tight loop if the SSL session gets
+ closed by the protocol layer while there is still unprocessed data stuck in the protocol session
+ buffer.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+* HTTPCORE-660: Convert RuntimeExceptions thrown by SSLSetupHandler#verify to SSLExceptions.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+
+
Release 4.4.14
-------------------
=====================================
httpcore-ab/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.4.14</version>
+ <version>4.4.15</version>
</parent>
<artifactId>httpcore-ab</artifactId>
<name>Apache HttpCore Benchmarking Tool</name>
=====================================
httpcore-nio/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.4.14</version>
+ <version>4.4.15</version>
</parent>
<artifactId>httpcore-nio</artifactId>
<name>Apache HttpCore NIO</name>
=====================================
httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
=====================================
@@ -509,6 +509,8 @@ public class NHttpConnectionBase
return;
}
this.status = CLOSING;
+ this.inbuf.clear();
+ this.hasBufferedInput = false;
if (this.outbuf.hasData()) {
this.session.setEvent(EventMask.WRITE);
} else {
=====================================
httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
=====================================
@@ -465,7 +465,11 @@ public abstract class AbstractIOReactor implements IOReactor {
final SelectionKey key = entry.getSelectionKey();
final int eventMask = entry.getEventMask();
if (key.isValid()) {
- key.interestOps(eventMask);
+ try {
+ key.interestOps(eventMask);
+ } catch (final CancelledKeyException ex) {
+ // ignore and move on
+ }
}
}
}
=====================================
httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java
=====================================
@@ -412,4 +412,9 @@ public class SessionInputBufferImpl extends ExpandableBuffer implements SessionI
return found ? tmpBuffer.toString() : null;
}
+ @Override
+ public void clear() {
+ super.clear();
+ }
+
}
=====================================
httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java
=====================================
@@ -307,4 +307,9 @@ public class SessionOutputBufferImpl extends ExpandableBuffer implements Session
}
}
+ @Override
+ public void clear() {
+ super.clear();
+ }
+
}
=====================================
httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
=====================================
@@ -368,7 +368,13 @@ public class SSLIOSession implements IOSession, SessionBufferStatus, SocketAcces
// It is never generated by SSLEngine.getHandshakeStatus().
if (result != null && result.getHandshakeStatus() == HandshakeStatus.FINISHED) {
if (this.handler != null) {
- this.handler.verify(this.session, this.sslEngine.getSession());
+ try {
+ this.handler.verify(this.session, this.sslEngine.getSession());
+ } catch (final RuntimeException ex) {
+ // Some libraries can throw a plan RuntimeException from #verify method
+ // in case of a hostname verification failure in violation of the API contract
+ throw convert(ex);
+ }
}
}
}
=====================================
httpcore-osgi/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.4.14</version>
+ <version>4.4.15</version>
</parent>
<artifactId>httpcore-osgi</artifactId>
<name>Apache HttpCore OSGi bundle</name>
=====================================
httpcore/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.4.14</version>
+ <version>4.4.15</version>
</parent>
<artifactId>httpcore</artifactId>
<name>Apache HttpCore</name>
=====================================
httpcore/src/main/java/org/apache/http/HttpStatus.java
=====================================
@@ -156,6 +156,8 @@ public interface HttpStatus {
int SC_LOCKED = 423;
/** {@code 424 Failed Dependency} (WebDAV - RFC 2518) */
int SC_FAILED_DEPENDENCY = 424;
+ /** {@code 429 Too Many Requests} (Additional HTTP Status Codes - RFC 6585) */
+ int SC_TOO_MANY_REQUESTS = 429;
// --- 5xx Server Error ---
=====================================
httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
=====================================
@@ -316,18 +316,6 @@ public class BHttpConnectionBase implements HttpInetConnection {
try {
this.inBuffer.clear();
this.outbuffer.flush();
- try {
- try {
- socket.shutdownOutput();
- } catch (final IOException ignore) {
- }
- try {
- socket.shutdownInput();
- } catch (final IOException ignore) {
- }
- } catch (final UnsupportedOperationException ignore) {
- // if one isn't supported, the other one isn't either
- }
} finally {
socket.close();
}
=====================================
httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
=====================================
@@ -93,7 +93,7 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
new String[3], // 1xx
new String[8], // 2xx
new String[8], // 3xx
- new String[25], // 4xx
+ new String[30], // 4xx
new String[8] // 5xx
};
@@ -140,6 +140,8 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
"Forbidden");
setReason(HttpStatus.SC_NOT_FOUND,
"Not Found");
+ setReason(HttpStatus.SC_TOO_MANY_REQUESTS,
+ "Too Many Requests");
setReason(HttpStatus.SC_INTERNAL_SERVER_ERROR,
"Internal Server Error");
setReason(HttpStatus.SC_NOT_IMPLEMENTED,
=====================================
httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java
=====================================
@@ -128,8 +128,6 @@ public class TestBHttpConnectionBase {
Mockito.verify(outStream, Mockito.times(1)).write(
Matchers.<byte []>any(), Matchers.anyInt(), Matchers.anyInt());
- Mockito.verify(socket, Mockito.times(1)).shutdownInput();
- Mockito.verify(socket, Mockito.times(1)).shutdownOutput();
Mockito.verify(socket, Mockito.times(1)).close();
conn.close();
=====================================
pom.xml
=====================================
@@ -33,7 +33,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>httpcomponents-core</artifactId>
<name>Apache HttpComponents Core</name>
- <version>4.4.14</version>
+ <version>4.4.15</version>
<description>Apache HttpComponents Core is a library of components for building HTTP enabled services</description>
<url>http://hc.apache.org/httpcomponents-core-ga</url>
<inceptionYear>2005</inceptionYear>
@@ -61,7 +61,7 @@
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/httpcomponents-core.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/httpcomponents-core.git</developerConnection>
<url>https://github.com/apache/httpcomponents-core/tree/${project.scm.tag}</url>
- <tag>4.4.14</tag>
+ <tag>4.4.15</tag>
</scm>
<modules>
View it on GitLab: https://salsa.debian.org/java-team/httpcomponents-core/-/commit/ca54597768167eee1564f0afa19092543c73d48b
--
View it on GitLab: https://salsa.debian.org/java-team/httpcomponents-core/-/commit/ca54597768167eee1564f0afa19092543c73d48b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220502/1d92b60a/attachment.htm>
More information about the pkg-java-commits
mailing list