[Git][java-team/httpcomponents-core][master] 3 commits: New upstream version 4.4.15

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Mon May 2 17:29:07 BST 2022



Emmanuel Bourg pushed to branch master 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
- - - - -
a4648d7b by Emmanuel Bourg at 2022-05-02T18:26:15+02:00
Update upstream source from tag 'upstream/4.4.15'

Update to upstream version '4.4.15'
with Debian dir 6d528045649bfda91699cbbe9345bbc94d3c5be7
- - - - -
b75c0246 by Emmanuel Bourg at 2022-05-02T18:28:43+02:00
New upstream release (4.4.15)

- - - - -


16 changed files:

- RELEASE_NOTES.txt
- debian/changelog
- 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
 -------------------
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+httpcomponents-core (4.4.15-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Mon, 02 May 2022 18:28:19 +0200
+
 httpcomponents-core (4.4.14-2) unstable; urgency=medium
 
   * Track only the 4.x releases


=====================================
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/-/compare/a5359ea0260b9c7a96424d9961f297e1da5294a7...b75c0246a93f716d369d30a1aac749a5698cf6f7

-- 
View it on GitLab: https://salsa.debian.org/java-team/httpcomponents-core/-/compare/a5359ea0260b9c7a96424d9961f297e1da5294a7...b75c0246a93f716d369d30a1aac749a5698cf6f7
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/4b18a2ec/attachment.htm>


More information about the pkg-java-commits mailing list