hgomez      01/08/23 08:51:08

  Modified:    jk/native/common jk_ajp13.h jk_ajp_common.c
  Log:
  Handle client Browser Stop Button
  Submitted by: William Barker <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.6       +2 -1      jakarta-tomcat-connectors/jk/native/common/jk_ajp13.h
  
  Index: jk_ajp13.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp13.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_ajp13.h        2001/07/23 21:02:43     1.5
  +++ jk_ajp13.h        2001/08/23 15:51:08     1.6
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Experimental bi-directionl protocol handler.               *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.5 $                                           *
  + * Version:     $Revision: 1.6 $                                           *
    ***************************************************************************/
   #ifndef JK_AJP13_H
   #define JK_AJP13_H
  @@ -79,6 +79,7 @@
   #define AJP13_DEF_CACHE_SZ          (1)
   #define JK_INTERNAL_ERROR            (-2)
   #define JK_FATAL_ERROR              (-3)
  +#define JK_CLIENT_ERROR             (-4)
   #define AJP13_MAX_SEND_BODY_SZ      (DEF_BUFFER_SZ - 6)
   
   /*
  
  
  
  1.7       +12 -3     jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_ajp_common.c   2001/07/23 21:02:43     1.6
  +++ jk_ajp_common.c   2001/08/23 15:51:08     1.7
  @@ -59,7 +59,7 @@
    * Description: common stuff for bi-directional protocols ajp13/ajp14.     *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    * Author:      Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.6 $                                           *
  + * Version:     $Revision: 1.7 $                                           *
    ***************************************************************************/
   
   
  @@ -861,7 +861,7 @@
                                          (const char * const *)res.header_values,
                                          res.num_headers)) {
                       jk_log(l, JK_LOG_ERROR, "Error ajp_process_callback - 
start_response failed\n");
  -                    return JK_FATAL_ERROR;
  +                    return JK_CLIENT_ERROR;
                   }
               }
            break;
  @@ -871,7 +871,7 @@
                    unsigned len = (unsigned)jk_b_get_int(msg);
                   if(!r->write(r, jk_b_get_buff(msg) + jk_b_get_pos(msg), len)) {
                       jk_log(l, JK_LOG_ERROR, "Error ajp_process_callback - write 
failed\n");
  -                    return JK_FATAL_ERROR;
  +                    return JK_CLIENT_ERROR;
                   }
               }
            break;
  @@ -980,6 +980,15 @@
              */
               op->recoverable = JK_FALSE;
               return JK_FALSE;
  +        } else if(JK_CLIENT_ERROR == rc) {
  +                  /*
  +                   * Client has stop talking to us, so get out.
  +                   * We assume this isn't our fault, so just a normal exit.
  +                   * In most (all?)  cases, the ajp13_endpoint::reuse will still be
  +                   * false here, so this will be functionally the same as an
  +                   * un-recoverable error.  We just won't log it as such.
  +                   */
  +                return JK_TRUE;
                } else if(rc < 0) {
                        return (JK_FALSE); /* XXX error */
                }
  
  
  

Reply via email to