You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2001/01/10 18:31:05 UTC

cvs commit: httpd-2.0/modules/generators mod_info.c

trawick     01/01/10 09:31:05

  Modified:    modules/generators mod_info.c
  Log:
  get mod_info working again (mostly)
  
  (I guess I should simply zap the code to list the handlers
  for each module?)
  
  Revision  Changes    Path
  1.19      +10 -6     httpd-2.0/modules/generators/mod_info.c
  
  Index: mod_info.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_info.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_info.c	2000/11/29 15:16:54	1.18
  +++ mod_info.c	2001/01/10 17:31:04	1.19
  @@ -269,7 +269,9 @@
       const char *cfname;
       const char *more_info;
       const command_rec *cmd = NULL;
  +#ifdef NEVERMORE
       const handler_rec *hand = NULL;
  +#endif
       server_rec *serv = r->server;
       int comma = 0;
   
  @@ -328,6 +330,7 @@
                               "<font size=+1><tt>%s</tt></a></font>\n",
                               modp->name, modp->name);
                   ap_rputs("<dt><strong>Content handlers:</strong>", r);
  +#ifdef NEVERMORE
                   hand = modp->handlers;
                   if (hand) {
                       while (hand) {
  @@ -346,6 +349,9 @@
                   else {
                       ap_rputs("<tt> <EM>none</EM></tt>", r);
                   }
  +#else
  +                ap_rputs("<tt> <EM>(code broken)</EM></tt>", r);
  +#endif
                   ap_rputs("<dt><strong>Configuration Phase Participation:</strong> \n",
                         r);
                   if (modp->create_dir_config) {
  @@ -454,11 +460,10 @@
       {NULL}
   };
   
  -static const handler_rec info_handlers[] =
  +static void register_hooks(void)
   {
  -    {"server-info", display_info},
  -    {NULL}
  -};
  +    ap_hook_handler(display_info, NULL, NULL, AP_HOOK_MIDDLE);
  +}
   
   module AP_MODULE_DECLARE_DATA info_module =
   {
  @@ -468,6 +473,5 @@
       create_info_config,         /* server config */
       merge_info_config,          /* merge server config */
       info_cmds,                  /* command apr_table_t */
  -    info_handlers,              /* handlers */
  -    NULL,                       /* filename translation */
  +    register_hooks
   };
  
  
  

Re: cvs commit: httpd-2.0/modules/generators mod_info.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
Greg Ames <gr...@raleigh.ibm.com> writes:

> trawick@apache.org wrote:
> 
> >   get mod_info working again (mostly)
> > 
> >   (I guess I should simply zap the code to list the handlers
> >   for each module?)
> > 
> 
> uhhh....what does it say at the moment for handlers with a full build
> (every module possible enabled)?  Nothing at all?   

For each module, it simply says "Content handlers: (code broken)".

Maybe I don't understand the question because I don't see the
relevance of the condition "full build (every module pssible
enabled)".  This display simply cycles through the loaded modules.
Yes, there are a few more in some builds than in others, but the
format is the same.

> Then, should it change to list hooks, or do we already get this?  Could
> anyone beside us use this info?  hmmm....module developers might
> care.

If a module checks for weird conditions which control whether or not
certain hooks are registered, then perhaps the developer would care.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/modules/generators mod_info.c

Posted by Greg Ames <gr...@raleigh.ibm.com>.
trawick@apache.org wrote:

>   get mod_info working again (mostly)
> 
>   (I guess I should simply zap the code to list the handlers
>   for each module?)
> 

uhhh....what does it say at the moment for handlers with a full build
(every module possible enabled)?  Nothing at all?   

Then, should it change to list hooks, or do we already get this?  Could
anyone beside us use this info?  hmmm....module developers might care.

Greg

Re: cvs commit: httpd-2.0/modules/generators mod_info.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
Greg Stein <gs...@lyra.org> writes:

> >...
> >   -static const handler_rec info_handlers[] =
> >   +static void register_hooks(void)
> >    {
> >   -    {"server-info", display_info},
> >   -    {NULL}
> >   -};
> >   +    ap_hook_handler(display_info, NULL, NULL, AP_HOOK_MIDDLE);
> >   +}
> 
> I didn't see a strcmp() for "server-info" here. You might suddenly start
> serving info requests everywhere :-)

:)  (to be fixed shortly!)

at least it compiles now and we got it mostly fixed!

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/modules/generators mod_info.c

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Jan 10, 2001 at 05:31:05PM -0000, trawick@apache.org wrote:
> trawick     01/01/10 09:31:05
> 
>   Modified:    modules/generators mod_info.c
>   Log:
>   get mod_info working again (mostly)
>   
>   (I guess I should simply zap the code to list the handlers
>   for each module?)

Nah... we might be able to figure out something in the future. That will be
a reminder that we used to be able to print out handlers.

>...
>   -static const handler_rec info_handlers[] =
>   +static void register_hooks(void)
>    {
>   -    {"server-info", display_info},
>   -    {NULL}
>   -};
>   +    ap_hook_handler(display_info, NULL, NULL, AP_HOOK_MIDDLE);
>   +}

I didn't see a strcmp() for "server-info" here. You might suddenly start
serving info requests everywhere :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/