tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_status.c
Date Sun, 13 Feb 2005 12:22:31 GMT
mturk       2005/02/13 04:22:31

  Modified:    jk/native/common jk_status.c
  Log:
  Add header and footer html
  
  Revision  Changes    Path
  1.2       +25 -2     jakarta-tomcat-connectors/jk/native/common/jk_status.c
  
  Index: jk_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_status.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_status.c	6 Feb 2005 17:43:09 -0000	1.1
  +++ jk_status.c	13 Feb 2005 12:22:31 -0000	1.2
  @@ -29,6 +29,14 @@
   
   #define HUGE_BUFFER_SIZE (8*1024)
   
  +#define JK_STATUS_HEAD "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
  +                       "DTD HTML 3.2 Final//EN\">\n"      \
  +                       "<html><head><title>JK Status Manager</title></head>\n"
 \
  +                       "<body>\n"
  +
  +#define JK_STATUS_HEND "</body>\n</html>\n"
  +
  +
   typedef struct status_worker status_worker_t;
   
   struct status_endpoint
  @@ -47,6 +55,7 @@
       const char        *name;
       jk_worker_t       worker;
       status_endpoint_t ep;
  +    jk_worker_env_t   *we;
   };
   
   static const char *headers_names[] = {
  @@ -130,7 +139,15 @@
       if (e && e->endpoint_private && s) {
           status_endpoint_t *p = e->endpoint_private;
   
  +        s->start_response(s, 200, "OK", headers_names, headers_vals, 3);
  +        s->write(s, JK_STATUS_HEAD, sizeof(JK_STATUS_HEAD) - 1);
  +        
  +        /* Step 1: Process GET params and update configuration */
   
  +        /* Step 2: Display configuration */
  +
  +
  +        s->write(s, JK_STATUS_HEND, sizeof(JK_STATUS_HEND) - 1);
           JK_TRACE_EXIT(l);
           return JK_TRUE;
       }
  @@ -163,6 +180,9 @@
   
       if (pThis && pThis->worker_private) {
           status_worker_t *p = pThis->worker_private;
  +
  +        JK_TRACE_EXIT(l);
  +        return JK_TRUE;
       }
   
       JK_LOG_NULL_PARAMS(l);
  @@ -176,7 +196,10 @@
   {
       status_worker_t *p = (status_worker_t *)pThis->worker_private;
       JK_TRACE_ENTER(log);
  -
  +    if (pThis && pThis->worker_private) {
  +        status_worker_t *p = pThis->worker_private;
  +        p->we = we;
  +    }
       JK_TRACE_EXIT(log);
       return JK_TRUE;
   }
  
  
  

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


Mime
View raw message