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 2007/06/05 22:26:19 UTC
svn commit: r544619 -
/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java
Author: olegk
Date: Tue Jun 5 13:26:18 2007
New Revision: 544619
URL: http://svn.apache.org/viewvc?view=rev&rev=544619
Log:
HTTPCORE-77: The result of CharsetDecoder#decode() and CharsetEncoder#encode() was not checked for errors resulting in an infinite loop in SessionInputBuffer#readLine() and SessionOutputBuffer#writeLine() when malformed characters were processed.
Follow-up patch.
Contributed by Steffen Pingel <spingel at limewire.com>
Reviewed by Oleg Kalnichevski
Modified:
jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java
Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java?view=diff&rev=544619&r1=544618&r2=544619
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java Tue Jun 5 13:26:18 2007
@@ -143,6 +143,9 @@
boolean retry = true;
while (retry) {
CoderResult result = this.charencoder.flush(this.buffer);
+ if (result.isError()) {
+ result.throwException();
+ }
if (result.isOverflow()) {
expand();
}