You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1997/08/26 11:16:44 UTC

[PATCH] SERVER_BUILT string added to version info

At the places where the SERVER_VERSION string is used, it might be
useful to have the corresponding SERVER_BUILT string as well.
Otherwise it's necessary to look into the error_log to get this
information...

RFC: Does it make sense to add the build timestamp to these places?

    Martin

> ./httpd -v
Server version: Apache/1.3a2-dev
Server built:   Di 26.Aug.1997, 11:03:42 MET DST

> cvs diff -u main/http_main.c
Index: main/http_main.c
===================================================================
RCS file: /home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.9
diff -u -r1.9 http_main.c
--- http_main.c	1997/08/26 07:29:09	1.9
+++ http_main.c	1997/08/26 09:04:24
@@ -3315,7 +3315,8 @@
             server_confname[sizeof(server_confname)-1] = '\0';
             break;
           case 'v':
-            printf("Server version %s.\n",SERVER_VERSION);
+	    printf("Server version: %s\n", SERVER_VERSION);
+	    printf("Server built:   %s\n", SERVER_BUILT);
             exit(0);
           case 'h':
 	    show_directives();
@@ -3332,7 +3333,7 @@
     }
 
 #ifdef __EMX__
-    printf("%s \n",SERVER_VERSION);
+    printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
     printf("OS/2 port by Garey Smiley <ga...@slink.com> \n");
 #endif
 
@@ -4145,7 +4146,8 @@
             server_confname[sizeof(server_confname)-1] = '\0';
             break;
           case 'v':
-            printf("Server version %s.\n",SERVER_VERSION);
+	    printf("Server version: %s\n", SERVER_VERSION);
+	    printf("Server built:   %s\n", SERVER_BUILT);
             exit(0);
           case 'h':
 	    show_directives();
@@ -4162,13 +4164,13 @@
     }
 
 #ifdef __EMX__
-    printf("%s \n",SERVER_VERSION);
+    printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
     printf("OS/2 port by Garey Smiley <ga...@slink.com> \n");
 #endif
 #ifdef WIN32
     if(!child)
     {
-        printf("%s \n",SERVER_VERSION);
+	printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
         printf("WIN32 port by Ambarish Malpani <am...@valicert.com> and the Apache Group.\n");
     }
 #endif

> cvs diff -u modules/standard/mod_info.c
Index: modules/standard/mod_info.c
===================================================================
RCS file: /home/cvs/apachen/src/modules/standard/mod_info.c,v
retrieving revision 1.3.0.1
diff -u -r1.3.0.1 mod_info.c
--- mod_info.c	1997/08/21 11:58:50	1.3.0.1
+++ mod_info.c	1997/08/26 09:13:27
@@ -350,6 +350,8 @@
 		if(!r->args || !strcasecmp(r->args,"server")) {	
 			ap_snprintf(buf, sizeof(buf), "<a name=\"server\"><strong>Server Version:</strong> <font size=+1><tt>%s</tt></a></font><br>\n",SERVER_VERSION);
 			rputs(buf,r);
+			ap_snprintf(buf, sizeof(buf), "<strong>Server Built:</strong> <tt>%s</tt><br>\n",SERVER_BUILT);
+			rputs(buf,r);
 			ap_snprintf(buf, sizeof(buf), "<strong>API Version:</strong> <tt>%d</tt><br>\n",MODULE_MAGIC_NUMBER);
 			rputs(buf,r);
 			ap_snprintf(buf, sizeof(buf), "<strong>Run Mode:</strong> <tt>%s</tt><br>\n",standalone?"standalone":"inetd");
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: [PATCH] SERVER_BUILT string added to version info

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> Makes sense to me +1
> 
> Dean
> 
> On Tue, 26 Aug 1997, Martin Kraemer wrote:
> 
> > At the places where the SERVER_VERSION string is used, it might be
> > useful to have the corresponding SERVER_BUILT string as well.
> > Otherwise it's necessary to look into the error_log to get this
> > information...
> >
> > RFC: Does it make sense to add the build timestamp to these places?

I haven't checked this, but has anyone considered how SERVER_BUILT is
going to be set on Win32?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 994 6435|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 994 6472|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: [PATCH] SERVER_BUILT string added to version info

Posted by Dean Gaudet <dg...@arctic.org>.
Makes sense to me +1

Dean

On Tue, 26 Aug 1997, Martin Kraemer wrote:

> At the places where the SERVER_VERSION string is used, it might be
> useful to have the corresponding SERVER_BUILT string as well.
> Otherwise it's necessary to look into the error_log to get this
> information...
> 
> RFC: Does it make sense to add the build timestamp to these places?
> 
>     Martin
> 
> > ./httpd -v
> Server version: Apache/1.3a2-dev
> Server built:   Di 26.Aug.1997, 11:03:42 MET DST
> 
> > cvs diff -u main/http_main.c
> Index: main/http_main.c
> ===================================================================
> RCS file: /home/cvs/apachen/src/main/http_main.c,v
> retrieving revision 1.9
> diff -u -r1.9 http_main.c
> --- http_main.c	1997/08/26 07:29:09	1.9
> +++ http_main.c	1997/08/26 09:04:24
> @@ -3315,7 +3315,8 @@
>              server_confname[sizeof(server_confname)-1] = '\0';
>              break;
>            case 'v':
> -            printf("Server version %s.\n",SERVER_VERSION);
> +	    printf("Server version: %s\n", SERVER_VERSION);
> +	    printf("Server built:   %s\n", SERVER_BUILT);
>              exit(0);
>            case 'h':
>  	    show_directives();
> @@ -3332,7 +3333,7 @@
>      }
>  
>  #ifdef __EMX__
> -    printf("%s \n",SERVER_VERSION);
> +    printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
>      printf("OS/2 port by Garey Smiley <ga...@slink.com> \n");
>  #endif
>  
> @@ -4145,7 +4146,8 @@
>              server_confname[sizeof(server_confname)-1] = '\0';
>              break;
>            case 'v':
> -            printf("Server version %s.\n",SERVER_VERSION);
> +	    printf("Server version: %s\n", SERVER_VERSION);
> +	    printf("Server built:   %s\n", SERVER_BUILT);
>              exit(0);
>            case 'h':
>  	    show_directives();
> @@ -4162,13 +4164,13 @@
>      }
>  
>  #ifdef __EMX__
> -    printf("%s \n",SERVER_VERSION);
> +    printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
>      printf("OS/2 port by Garey Smiley <ga...@slink.com> \n");
>  #endif
>  #ifdef WIN32
>      if(!child)
>      {
> -        printf("%s \n",SERVER_VERSION);
> +	printf("%s (built %s)\n", SERVER_VERSION, SERVER_BUILT);
>          printf("WIN32 port by Ambarish Malpani <am...@valicert.com> and the Apache Group.\n");
>      }
>  #endif
> 
> > cvs diff -u modules/standard/mod_info.c
> Index: modules/standard/mod_info.c
> ===================================================================
> RCS file: /home/cvs/apachen/src/modules/standard/mod_info.c,v
> retrieving revision 1.3.0.1
> diff -u -r1.3.0.1 mod_info.c
> --- mod_info.c	1997/08/21 11:58:50	1.3.0.1
> +++ mod_info.c	1997/08/26 09:13:27
> @@ -350,6 +350,8 @@
>  		if(!r->args || !strcasecmp(r->args,"server")) {	
>  			ap_snprintf(buf, sizeof(buf), "<a name=\"server\"><strong>Server Version:</strong> <font size=+1><tt>%s</tt></a></font><br>\n",SERVER_VERSION);
>  			rputs(buf,r);
> +			ap_snprintf(buf, sizeof(buf), "<strong>Server Built:</strong> <tt>%s</tt><br>\n",SERVER_BUILT);
> +			rputs(buf,r);
>  			ap_snprintf(buf, sizeof(buf), "<strong>API Version:</strong> <tt>%d</tt><br>\n",MODULE_MAGIC_NUMBER);
>  			rputs(buf,r);
>  			ap_snprintf(buf, sizeof(buf), "<strong>Run Mode:</strong> <tt>%s</tt><br>\n",standalone?"standalone":"inetd");
> -- 
> | S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
> | ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
> | N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
> ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request
>