Ok, so if i get the problem:
Messages need to end with "CRLF" followed by the terminator "CRLF.CRLF" ?
But some clients arnt sending the first CRLF, so when the message gets sent
back, it doesnt include the CRLF on the end?
Why dont you modify the code so that it puts a crlf on the end if there isnt
one already?
Looking at the code, it should be easy to do as it stores it.
In NNTPRepositoryImpl.java in the createArticle(InputStream in) method:
Just after the copy:
while ( ( bytesRead = in.read(readBuffer, 0, 1024) ) > 0 ) {
fout.write(readBuffer, 0, bytesRead);
}
ADD:
if (readBuffer[bytesRead==0?1023:bytesRead-1]!='\n'){
fout.write(new byte[]{'\r','\n'});
}
Note that i havn't tried the code, just made it up in my head :)
Daniel.
> -----Original Message-----
> From: Chemi [mailto:[EMAIL PROTECTED]
> Sent: 12 October 2004 15:59
> To: James Users List
> Subject: Re: Problem reading posts from NNTP server
>
>
> Ok, after some investigation I found there is a bug opened to this:
> http://nagoya.apache.org/jira/browse/JAMES-311
> It seems NNTP clients are not sending messages with CRLFs at the end.
> And this fact breaks the protocol.
>
> Let's see if there is a qucik fix because this is an stopper to deploy
> James as NNTP Server.
>
> Regards,
>
> Chemi.
>
> Chemi wrote:
>
> > Hi. I have downloaded James to do some NNTP tests.
> > I have created several news groups and post some messages to them
> > (using Mozilla 1.7.3).
> >
> > The problem is accessing to those posts. It is really slow showing the
> > body of the messages (the headers appear instantly). After some tests
> > I was able to confirm that it shows the body after exactly 4 minutes.
> > I did the access once again from Mozilla 1.7.3 and also from a Java
> > Test Client I developed with Jakarta-Commons-Net. In both cases I get
> > the body after 4 minutes.
> >
> > It seems to me that 4 minutes is some kind of time-out internally in
> > James. I did a search within Config.xml file but I didn't find that
> > number. Any idea? The POP3 access hasn't this problem.
> >
> > I also did the test via Telnet (port 119) sending directly NNTP
> > Commands and in that case I get the body instantly with no delay.
> >
> > Any idea? Any help?
> >
> > Thanks in advance,
> >
> > Chemi.
> >
> > ---------------------------------------------------------------------
> > 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]