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 2018/08/14 07:51:46 UTC

[11/12] httpcomponents-core git commit: [HTTPCORE-550] When a ParseException is caught and rethrown as an IOException in org.apache.http.impl.nio.codecs.ChunkDecoder.processFooters(), the IOException does not chain the original ParseException.

[HTTPCORE-550] When a ParseException is caught and rethrown as an
IOException in org.apache.http.impl.nio.codecs.ChunkDecoder.processFooters(),
the IOException does not chain the original ParseException.


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/14e3a19a
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/14e3a19a
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/14e3a19a

Branch: refs/heads/4.4.x
Commit: 14e3a19a9b2f3983b05f6f9600293fd036eaa4a3
Parents: 9bfbbb4
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 13 22:04:01 2018 -0600
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Aug 14 09:49:35 2018 +0200

----------------------------------------------------------------------
 RELEASE_NOTES.txt                                                 | 3 +++
 .../main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/14e3a19a/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 6ebc2db..f6d6b14 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -11,6 +11,9 @@ Changelog
 
 * Fix typos in exception messages.
   Contributed by Gary Gregory <ggregory at apache.org>
+  
+* HTTPCORE-550: When a ParseException is caught and rethrown as an IOException in org.apache.http.impl.nio.codecs.ChunkDecoder.processFooters(), the IOException does not chain the original ParseException.
+  Contributed by Gary Gregory <ggregory at apache.org>
 
 
 Release 4.4.10

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/14e3a19a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
index 77e05dd..6cd8adb 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
@@ -174,7 +174,7 @@ public class ChunkDecoder extends AbstractContentDecoder {
                 try {
                     this.footers[i] = new BufferedHeader(this.trailerBufs.get(i));
                 } catch (final ParseException ex) {
-                    throw new IOException(ex.getMessage());
+                    throw new IOException(ex);
                 }
             }
         }