ben         99/07/25 07:24:03

  Modified:    mpm/src/include http_protocol.h httpd.h
               mpm/src/main http_core.c http_protocol.c util.c
  Log:
  Add some more hooks.
  
  Revision  Changes    Path
  1.4       +2 -0      apache-2.0/mpm/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_protocol.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- http_protocol.h   1999/07/17 10:35:34     1.3
  +++ http_protocol.h   1999/07/25 14:24:00     1.4
  @@ -225,6 +225,8 @@
      */
   DECLARE_HOOK(int,post_read_request,(request_rec *))
   DECLARE_HOOK(int,log_transaction,(request_rec *))
  +DECLARE_HOOK(const char *,http_method,(const request_rec *))
  +DECLARE_HOOK(unsigned short,default_port,(const request_rec *))
   
   #ifdef __cplusplus
   }
  
  
  
  1.9       +2 -2      apache-2.0/mpm/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/httpd.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- httpd.h   1999/07/19 05:17:49     1.8
  +++ httpd.h   1999/07/25 14:24:00     1.9
  @@ -140,8 +140,8 @@
   #define DEFAULT_HTTP_PORT    80
   #define DEFAULT_HTTPS_PORT   443
   #define ap_is_default_port(port,r)   ((port) == ap_default_port(r))
  -#define ap_http_method(r)    "http"
  -#define ap_default_port(r)   DEFAULT_HTTP_PORT
  +#define ap_http_method(r)    ap_run_http_method(r)
  +#define ap_default_port(r)   ap_run_default_port(r)
   
   /* --------- Default user name and group name running standalone ---------- 
*/
   /* --- These may be specified as numbers by placing a # before a number --- 
*/
  
  
  
  1.11      +8 -0      apache-2.0/mpm/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- http_core.c       1999/07/24 18:38:48     1.10
  +++ http_core.c       1999/07/25 14:24:01     1.11
  @@ -2630,11 +2630,19 @@
       ap_open_logs(s, pconf);
   }
   
  +static const char *core_method(const request_rec *r)
  +    { return "http"; }
  +
  +static unsigned short core_port(const request_rec *r)
  +    { return DEFAULT_HTTP_PORT; }
  +
   static void register_hooks()
       {
       ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST);
       ap_hook_process_connection(ap_process_http_connection,NULL,NULL,
                               HOOK_REALLY_LAST);
  +    ap_hook_http_method(core_method,NULL,NULL,HOOK_REALLY_LAST);
  +    ap_hook_default_port(core_port,NULL,NULL,HOOK_REALLY_LAST);
       /* FIXME: I suspect we can eliminate the need for these - Ben */
       ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST);
       }
  
  
  
  1.13      +5 -0      apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- http_protocol.c   1999/07/17 10:35:41     1.12
  +++ http_protocol.c   1999/07/25 14:24:01     1.13
  @@ -78,6 +78,8 @@
   HOOK_STRUCT(
            HOOK_LINK(post_read_request)
            HOOK_LINK(log_transaction)
  +         HOOK_LINK(http_method)
  +         HOOK_LINK(default_port)
   );
   
   #define SET_BYTES_SENT(r) \
  @@ -2691,3 +2693,6 @@
   
   IMPLEMENT_HOOK(int,post_read_request,(request_rec 
*r),(r),RUN_ALL,OK,DECLINED)
   IMPLEMENT_HOOK(int,log_transaction,(request_rec *r),(r),RUN_ALL,OK,DECLINED)
  +IMPLEMENT_HOOK(const char *,http_method,(const request_rec *r),(r),RUN_FIRST,
  +            NULL,NULL)
  +IMPLEMENT_HOOK(unsigned short,default_port,(const request_rec 
*r),(r),RUN_FIRST,0,0)
  
  
  
  1.3       +1 -0      apache-2.0/mpm/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/util.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- util.c    1999/07/12 22:51:10     1.2
  +++ util.c    1999/07/25 14:24:01     1.3
  @@ -71,6 +71,7 @@
   #include "httpd.h"
   #include "http_main.h"
   #include "http_log.h"
  +#include "http_protocol.h"
   #if defined(SUNOS4)
   /* stdio.h has been read in ap_config.h already. Add missing prototypes 
here: */
   extern int fgetc(FILE *);
  
  
  

Reply via email to