james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Buchegger" <christian.bucheg...@planet-interkom.de>
Subject Re: [PATCH] fields in XOVER containing newline or tab disturb client
Date Mon, 02 Sep 2002 18:52:40 GMT

Using -Dapache.nntp.debug=true was my first aproach. But what I got was just
an output like
S: -1
:( this is because in the implementation of  PrintWriter in
NNTPHandler.handleConnection() only has a debug hook
in println(), but does not overwrite print(). So I decided to assemble the
line using StringBuffer rather than
overwrite print() and buffer the data just for debugging purposes.

So using this solution will give full usable output
whenever -Dapache.nntp.debug=true has to be used next.
I also checked that there are no further occurences of PrintWriter.print()
calls which could produce
missing debug data.


>> I don't think prt.print(..) to StringBuffer makes a
>> difference. PrintWriter will buffer till println is called and it seems a
>> bit cleaner.
>> To debug NNTP protocol, it is best to change runscript to have system
>> property -Dapache.nntp.debug=true. Client and Server communication for
>> nntp will show up in the log file with prefix 'C: ' and 'S: '. This
>> should help identify protocol problems. Helped me a lot.

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message