Hi Stefano,

the headers get written in the TOP command already. About the
StreamWriteFilter, you are right it would be better to use it in terms
of performance. I need to find a good sulution to still let the
Session not depend on mina (to keep it generic). Maybe a a
session.write(InputStream) would be good..

thoughts ?

And before I forgot, thx for the review ;)

Ps: What you mean with "thread for the piped streams)

2010/2/21 Stefano Bagnara <[email protected]>:
> I guess you have to write headers also for the TOP command.
>
> Also, pushing so many lines to MINA will fill mina buffers: it would
> be better to use StreamWriteFilter, but the "trick" is to generate an
> inputstream from a MimeMessage (without using a thread for the piped
> streams).
>
> Stefano
>
> 2010/2/21  <[email protected]>:
>> Author: norman
>> Date: Sun Feb 21 17:54:52 2010
>> New Revision: 912381
>>
>> URL: http://svn.apache.org/viewvc?rev=912381&view=rev
>> Log:
>> Write headers in RETR command (related to JAMES-973)
>>
>> Modified:
>>    
>> james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
>>
>> Modified: 
>> james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
>> URL: 
>> http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java?rev=912381&r1=912380&r2=912381&view=diff
>> ==============================================================================
>> --- 
>> james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
>>  (original)
>> +++ 
>> james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
>>  Sun Feb 21 17:54:52 2010
>> @@ -36,6 +36,7 @@
>>  import java.io.InputStreamReader;
>>  import java.util.ArrayList;
>>  import java.util.Collection;
>> +import java.util.Enumeration;
>>  import java.util.List;
>>
>>  /**
>> @@ -70,7 +71,9 @@
>>                 if (mc != dm) {
>>                     response = new POP3Response(POP3Response.OK_RESPONSE, 
>> "Message follows");
>>                     try {
>> -
>> +                        for (Enumeration e = 
>> mc.getMessage().getAllHeaderLines(); e.hasMoreElements(); ) {
>> +                            response.appendLine(e.nextElement().toString());
>> +                        }
>>                        // write the full mail to the client
>>                         writeMessageContentTo(mc, response, -1);
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to