keith       01/02/02 09:29:09

  Modified:    src/native/mod_jk/apache1.3 mod_jk.c
               src/native/mod_jk/common jk_ajp13_worker.c jk_service.h
                        jk_util.c
  Log:
  Unread body bits need to be discarded or Apache will consider
  them a new request.  (cf jserv_ajpv12.c:689)  Fix by adding a
  field to track how much of the body was actually sent.
  This may need to be added to the Apache 2.0 connector.
  
  Revision  Changes    Path
  1.4       +10 -0     jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_jk.c  2001/01/28 21:46:00     1.3
  +++ mod_jk.c  2001/02/02 17:28:47     1.4
  @@ -718,6 +718,16 @@
                                         l, 
                                         &is_recoverable_error);
                   
  +                    if (s.content_read < s.content_length) {
  +                     /* Toss all further characters left to read fm client */
  +                     char *buff = ap_palloc(r->pool, 2048);
  +                     if (buff != NULL) {
  +                         int rd;
  +                         while ((rd = ap_get_client_block(r, buff, 2048)) > 0) {
  +                             s.content_read += rd;
  +                         }
  +                     }
  +                 }
                       end->done(&end, l);
                   }
               }
  
  
  
  1.4       +3 -1      jakarta-tomcat/src/native/mod_jk/common/jk_ajp13_worker.c
  
  Index: jk_ajp13_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_ajp13_worker.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_ajp13_worker.c 2001/01/11 02:36:14     1.3
  +++ jk_ajp13_worker.c 2001/02/02 17:29:03     1.4
  @@ -57,7 +57,7 @@
    * Description: Experimental bi-directionl protocol.                       *
    * Author:      Costin <[EMAIL PROTECTED]>                              *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.3 $                                           *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
   #include "jk_pool.h"
  @@ -344,6 +344,7 @@
                }
   
                if(read_into_msg_buff(ep, r, msg, l, len)) {
  +                 r->content_read += len;
                    return JK_AJP13_HAS_RESPONSE;
                }                  
   
  @@ -604,6 +605,7 @@
               if(!read_into_msg_buff(p, s, msg, l, len)) {
                   return JK_FALSE;
               }                  
  +            s->content_read = len;
               if(!connection_tcp_send_message(p, msg, l)) {
                jk_log(l, JK_LOG_ERROR,
                                   "Error sending request body\n");
  
  
  
  1.3       +1 -0      jakarta-tomcat/src/native/mod_jk/common/jk_service.h
  
  Index: jk_service.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_service.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_service.h      2000/11/10 18:48:50     1.2
  +++ jk_service.h      2001/02/02 17:29:04     1.3
  @@ -58,7 +58,7 @@
    *              These are the web server (ws) the worker and the connection*
    *              JVM connection point                                       *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.2 $                                               *
  + * Version:     $Revision: 1.3 $                                               *
    ***************************************************************************/
   
   #ifndef JK_SERVICE_H
  @@ -104,6 +104,7 @@
       char    *server_software;
       unsigned content_length;    /* integer that represents the content  */
                                   /* length should be 0 if unknown.        */
  +    unsigned content_read;
   
       /*
        * SSL information
  
  
  
  1.3       +2 -1      jakarta-tomcat/src/native/mod_jk/common/jk_util.c
  
  Index: jk_util.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_util.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_util.c 2000/11/10 18:48:50     1.2
  +++ jk_util.c 2001/02/02 17:29:05     1.3
  @@ -56,7 +56,7 @@
   /***************************************************************************
    * Description: Utility functions (mainly configuration)                   *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.2 $                                               *
  + * Version:     $Revision: 1.3 $                                               *
    ***************************************************************************/
   
   
  @@ -697,6 +697,7 @@
       s->server_port          = 80;
       s->server_software      = NULL;
       s->content_length       = 0;
  +    s->content_read         = 0;
       s->is_ssl               = JK_FALSE;
       s->ssl_cert             = NULL;
       s->ssl_cert_len         = 0;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to