You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/11/21 18:58:35 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_ajp13.c

costin      2002/11/21 09:58:35

  Modified:    jk/native2/common jk_worker_ajp13.c
  Log:
  Same fix for jk2. Don't send initial chunk for chunked encoding.
  
  The reason the data is sent for POST - in almost all cases tomcat
  will read it ( required by the spec - to process the data ). This way
  we avoid a round-trip.
  
  We don't send more than 8k for few reasons - tomcat may want to
  discard the request ( for example to prevent a huge body that it
  can't handle ), the TCP stack would do round-trips anyway ( for flow-control )
  and most requests are <8k anyway.
  
  There is a major problem ( since the first release of Ajp13) related
  with the fact that this chunk of data is not properly
  marshalled ( it doesn't have the 'type' descriptor ).
  
  Revision  Changes    Path
  1.42      +8 -1      jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- jk_worker_ajp13.c	18 Oct 2002 15:23:52 -0000	1.41
  +++ jk_worker_ajp13.c	21 Nov 2002 17:58:35 -0000	1.42
  @@ -351,7 +351,14 @@
              request was sent ( we're receiving data from client, can be slow, no
              need to delay - we can do that in paralel. ( not very sure this is
              very usefull, and it brakes the protocol ) ! */
  -        if (has_post_body || s->is_chunked || s->left_bytes_to_send > 0) {
  +
  +	/* || s->is_chunked - this can't be done here. The original protocol sends the first
  +	   chunk of post data ( based on Content-Length ), and that's what the java side expects.
  +	   Sending this data for chunked would break other ajp13 serers.
  +
  +	   Note that chunking will continue to work - using the normal read.
  +	*/
  +        if (has_post_body  || s->left_bytes_to_send > 0) {
               /* We never sent any POST data and we check it we have to send at
                * least of block of data (max 8k). These data will be kept in reply
                * for resend if the remote Tomcat is down, a fact we will learn only
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>