tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteResponse.java
Date Tue, 09 Apr 2002 18:11:30 GMT
> On Tue, 9 Apr 2002, Remy Maucherat wrote:
>
> > >    public class CoyoteResponse
> > >   @@ -485,6 +485,7 @@
> > >            throws IOException {
> > >            // Writing leftover bytes
> > >            outputBuffer.close();
> > >   +        coyoteResponse.finish();
> > >        }
> >
> > This is called no matter what right after in the processing loop.
Calling it
> > twice is a bad idea.
>
> The tomcat3 adapter had this call too, and I put a println in ajp and it
> never got called.
>
> You mean the protocol adapter should call finish ?
>
> Can you add a small comment in Response and clearly indicate who should
> call it - I'm fine with any, but we should do it consistenlty in the 2
> adapters and in the 2 protocols.

The class which is implementing the Adapter interface is calling it in the
TC 4 code.

outputBuffer.close();
should COMMIT

coyoteResponse.finish();
should CLOSE

For the HTTP/1.1 protocol:
- Committing twice is not ok.
- Closing twice is not ok.

(Fixing commit twice is easy; there could be another flag for close)

Remy


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


Mime
View raw message