Author: norman
Date: Thu Jun 9 16:38:40 2011
New Revision: 1133977
URL: http://svn.apache.org/viewvc?rev=1133977&view=rev
Log:
Limit the InputStream via commons-io as nettys solution is buggy
Modified:
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NettyImapRequestLineReader.java
Modified:
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NettyImapRequestLineReader.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NettyImapRequestLineReader.java?rev=1133977&r1=1133976&r2=1133977&view=diff
==============================================================================
---
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NettyImapRequestLineReader.java
(original)
+++
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NettyImapRequestLineReader.java
Thu Jun 9 16:38:40 2011
@@ -21,6 +21,7 @@ package org.apache.james.imapserver.nett
import java.io.InputStream;
+import org.apache.commons.io.input.BoundedInputStream;
import org.apache.james.imap.decode.DecodingException;
import org.apache.james.imap.decode.ImapRequestLineReader;
import org.apache.james.imap.decode.base.EolInputStream;
@@ -90,7 +91,8 @@ public class NettyImapRequestLineReader
nextSeen = false;
nextChar = 0;
- ChannelBufferInputStream in = new ChannelBufferInputStream(buffer,
size);
+ // limit the size via commons-io as ChannelBufferInputStream size
limiting is buggy
+ InputStream in = new BoundedInputStream(new
ChannelBufferInputStream(buffer), size);
if (extraCRLF) {
return new EolInputStream(this, in);
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]