tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Dane <>
Date Thu, 15 Jun 2000 18:51:01 GMT
>>>>> "Arun" == Arun Chhatpar <> writes:

    Arun> Hi Joseph,
    Arun> 	Just wanted to know that did limiting your response BUFSIZE to a
    Arun> certain value solve this issue ?
    Arun> Thanks for the information.

Sorry to be misleading.  The "BUFSUZ" in my previous message was an
abstract one, meant only to imply that it was conceivable that some
buffer somewhere was involved in some way with the problem.  What lead 
me to this suspicion was that the error only occured when the response 
was fairly large.

After poking a bit in the source, it looks like the problem for me was 
at this point in

// Ajp use Status: instead of Status
class AJP12ResponseAdapter extends HttpResponseAdapter {
    /** Override setStatus
    protected void sendStatus( int status, String message)  throws IOException {
	statusSB.append("Status: " ).append( status ).append(" ").append(message).append("\r\n");
	sout.write(statusSB.toString().getBytes());  <-- NPE HERE

The sole constructor for HttpResponseAdapter sets up statusSB, so the
problem can't be there.  However, sout is not set in the constructor,
but must be set by calling setOutputStream on the adapter.  So, for
some reason either this is not getting called, or (far more likely)
recycle() is being called on the adapter, which does this:

    public void recycle() {

Still, I'm not familiar enough with the code to know why or when
recycle is supposed to be called.  I'm still poking around, though,
and will advise.



View raw message