You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2000/01/12 04:43:15 UTC

Re: cvs commit: apache-1.3/src/modules/standard mod_status.c

Hold on thar. Please reverse this. I don't think that everyone
approved this... I know that I, although didn't -1 it, didn't
think it should be added. I think Dean and Marc also had
opinions that the change was somewhat "misdirected".

Not only that, but the patch is wrong. It leaves the vhostrec fluff
in the scoreboard which is totally unneeded. It also causes a
MAGIC NUMBER bump, _real_ soon to a release.

fanf@hyperreal.org wrote:
> 
> fanf        00/01/11 17:13:39
> 
>   Modified:    src/include ap_mmn.h scoreboard.h
>                src/main http_main.c
>                src/modules/standard mod_status.c
>   Log:
>   Revert to the 1.3.3 way of getting the server name from the scoreboard,
>   with a modification to make it respect the UseCanonicalName setting.
>   This makes things work better with mass vhosting setups.
>   
>   Submitted by:	Cliff Woolley <jw...@wlu.edu>
>   Reviewed by:	Tony Finch
>   
>   Revision  Changes    Path
>   1.42      +4 -2      apache-1.3/src/include/ap_mmn.h
>   
>   Index: ap_mmn.h
>   ===================================================================
>   RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
>   retrieving revision 1.41
>   retrieving revision 1.42
>   diff -u -r1.41 -r1.42
>   --- ap_mmn.h	1999/08/14 08:53:48	1.41
>   +++ ap_mmn.h	2000/01/12 01:13:06	1.42
>   @@ -226,14 +226,16 @@
>     *                        ap_base64encode_len(), ap_base64decode(),
>     *                        ap_base64decode_binary(), ap_base64decode_len(),
>     *                        ap_pbase64decode(), ap_pbase64encode()
>   + * 	    (1.3.10-dev)
>   + * 20000112             - put the vhostname back into the scoreboard itself
>     */
>    
>    #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
>    
>    #ifndef MODULE_MAGIC_NUMBER_MAJOR
>   -#define MODULE_MAGIC_NUMBER_MAJOR 19990320
>   +#define MODULE_MAGIC_NUMBER_MAJOR 20000112
>    #endif
>   -#define MODULE_MAGIC_NUMBER_MINOR 6                     /* 0...n */
>   +#define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
>    #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */
>    
>    /* Useful for testing for features. */
>   
>   
>   
>   1.49      +1 -0      apache-1.3/src/include/scoreboard.h
>   
>   Index: scoreboard.h
>   ===================================================================
>   RCS file: /home/cvs/apache-1.3/src/include/scoreboard.h,v
>   retrieving revision 1.48
>   retrieving revision 1.49
>   diff -u -r1.48 -r1.49
>   --- scoreboard.h	1999/10/21 20:44:23	1.48
>   +++ scoreboard.h	2000/01/12 01:13:09	1.49
>   @@ -160,6 +160,7 @@
>        char request[64];		/* We just want an idea... */
>        server_rec *vhostrec;	/* What virtual host is being accessed? */
>                                    /* SEE ABOVE FOR SAFE USAGE! */
>   +    char vhostname[32]; 	/* more useful status with mass vhosting */
>    } short_score;
>    
>    typedef struct {
>   
>   
>   
>   1.487     +2 -0      apache-1.3/src/main/http_main.c
>   
>   Index: http_main.c
>   ===================================================================
>   RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
>   retrieving revision 1.486
>   retrieving revision 1.487
>   diff -u -r1.486 -r1.487
>   --- http_main.c	2000/01/01 17:07:34	1.486
>   +++ http_main.c	2000/01/12 01:13:23	1.487
>   @@ -2256,6 +2256,8 @@
>    				       sizeof(ss->request));
>    	    }
>    	    ss->vhostrec =  r->server;
>   +	    ap_cpystrn(ss->vhostname, ap_get_server_name(r),
>   +		       sizeof(ss->vhostname));
>    	}
>        }
>        if (status == SERVER_STARTING && r == NULL) {
>   
>   
>   
>   1.109     +2 -2      apache-1.3/src/modules/standard/mod_status.c
>   
>   Index: mod_status.c
>   ===================================================================
>   RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_status.c,v
>   retrieving revision 1.108
>   retrieving revision 1.109
>   diff -u -r1.108 -r1.109
>   --- mod_status.c	1999/10/21 20:45:42	1.108
>   +++ mod_status.c	2000/01/12 01:13:34	1.109
>   @@ -599,7 +599,7 @@
>    			ap_rprintf(r, " <i>%s {%s}</i> <b>[%s]</b><br>\n\n",
>    			    score_record.client,
>    			    ap_escape_html(r->pool, score_record.request),
>   -			    vhost ? vhost->server_hostname : "(unavailable)");
>   +			    vhost ? score_record.vhostname : "(unavailable)");
>    		    }
>    		    else {		/* !no_table_report */
>    			if (score_record.status == SERVER_DEAD)
>   @@ -672,7 +672,7 @@
>    			    ap_rprintf(r,
>    			     "<td>%s<td nowrap>%s<td nowrap>%s</tr>\n\n",
>    			     score_record.client,
>   -			     vhost ? vhost->server_hostname : "(unavailable)",
>   +			     vhost ? score_record.vhostname : "(unavailable)",
>    			     ap_escape_html(r->pool, score_record.request));
>    		    }		/* no_table_report */
>    		}			/* !short_report */
>   
>   
>   
> 


-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
                "Are you suggesting coconuts migrate??"

Re: cvs commit: apache-1.3/src/modules/standard mod_status.c

Posted by Tony Finch <do...@dotat.at>.
Jim Jagielski <ji...@jaguNET.com> wrote:
>
>Hold on thar. Please reverse this. I don't think that everyone
>approved this... I know that I, although didn't -1 it, didn't
>think it should be added.

Sorry, I must have misunderstood the conclusion of the thread.
I'll happily revert the patch if you want -- I'll check the lists
again around 1500 UTC.

>I think Dean and Marc also had opinions that the change was somewhat
>"misdirected".

I thought they were just correcting some minor misconceptions; I took
their comments on board when reviewing the change.

>Not only that, but the patch is wrong. It leaves the vhostrec fluff
>in the scoreboard which is totally unneeded.

I left it there because of the potential that third-party modules
might want to use it. It's also tied up with Dean's improvement of the
child-generation handling which is sufficiently intricate that I
decided not to look too closely at disentangling it.

>It also causes a MAGIC NUMBER bump, _real_ soon to a release.

Yes, I agree that that's dubious.

Tony.
-- 
dot it at

Re: cvs commit: apache-1.3/src/modules/standard mod_status.c

Posted by Dean Gaudet <dg...@arctic.org>.
On Tue, 11 Jan 2000, Jim Jagielski wrote:

> think it should be added. I think Dean and Marc also had
> opinions that the change was somewhat "misdirected".

no no, i was only pointing out a mistake in one of the series of
patches... which has been fixed.  i'm fine with this going in.

Dean