Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4CoyoteResponse.java

2002-09-11 Thread Amy Roh

Bill Barker wrote:
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 10:48 PM
> Subject: cvs commit:
> jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4
> CoyoteResponse.java
> 
> 
> 
>>amyroh  2002/09/11 22:48:19
>>
>>  Modified:coyote/src/java/org/apache/coyote Response.java
>>   coyote/src/java/org/apache/coyote/tomcat4
>>CoyoteResponse.java
>>  Log:
>>  Fix for Response.setLocale() to set charset encoding correctly -
> 
> bugzilla 10901.
> 
>>  Patch submitted by OGAWA Kan <[EMAIL PROTECTED]>.
>>
>>  Revision  ChangesPath
>>  1.14  +79 -74
> 
> jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
> 
>>  Index: Response.java
>>
> 
> 
> It would be really nice if people could split "tab-fix" from code commits.
> :(
> 
> Of course, it's not Amy's fault.  There shouldn't have been tabs in
> o.a.c.Response in the first place (It's under the 4.x coding specs).  I'm
> just whining here.

Yeah, I agree it's pretty ugly.  :-(  I just commited the fix.  :-)

Amy

> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4CoyoteResponse.java

2002-08-02 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:
> patrickl2002/08/01 10:20:36
> 
>   Modified:coyote/src/java/org/apache/coyote Response.java
>coyote/src/java/org/apache/coyote/tomcat4
> CoyoteResponse.java
>   Log:
>   Servlet 2.4 spec says that ServletResponse now gets two more methods, (from 
>sections 5.4, 14.2.22) Namely;
>   String getContentType();
>   void   setCharacterEncoding(String charset)
>   Submitted by:   Bob Herrmann ([EMAIL PROTECTED])

As I've said, I'm against this patch. Servlet 2.4 changes should go in a 
new adapter IMO, rather than mixing things.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4CoyoteResponse.java

2002-04-09 Thread costinm

On Tue, 9 Apr 2002, Remy Maucherat wrote:

> > 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.

Ok. I'll change  tomcat3 and revert the change on 4.0 ( and add a comment 
on adapter ). But first let's clarify how it's supposed to work, the 
current Tomcat4Adapter doesn't seem to call it - it calls 
Tomcat4Response.finish() but that didn't call Response.finish() before my 
patch. 


> outputBuffer.close();
> should COMMIT

There's no outputBuffer.close in the API - only in 4.0. 

Who should send the commit ? 


> coyoteResponse.finish();
> should CLOSE

Yes, but Tomcat4 Response finish() method didn't call 
coyoteResponse.finish(). 


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

Of course, same for ajp or any other protocol. We should definitely commit
only once and close only once - the question is who is responsible for 
that. 

Coyote Response has a sendHeaders() method, which sets commited to true.
I think it should also call the COMMIT hook - if not the caller of 
sendHeaders() ( Tomcat4 or Tomcat3 Response ) must do it. ( before my
fix it wasn't true - the COMMIt was sent by http11 before the first write 
).

Also, Response has a finish() that calls CLOSE - but finish wasn't called
by tomcat4's Response, neither by the adapter ( which called 
response.finishResponse() - but on the tomcat4 response, which didn't 
propagate to the coyote.Response ).

Costin




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4CoyoteResponse.java

2002-04-09 Thread costinm

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.

Costin



--
To unsubscribe, e-mail:   
For additional commands, e-mail: