Henri, > > What about reporting webapp version at init time, > > [Thu May 02 21:44:38 2002] [notice] Apache/2.0.35 (Unix) mod_ssl/2.0.35OpenSSL/0.9.6 >DAV/2 mod_jk/1.2.0 configured -- resuming normal operations > > > could be > > [Thu May 02 21:44:38 2002] [notice] Apache/2.0.35 (Unix) mod_ssl/2.0.35OpenSSL/0.9.6 >DAV/2 mod_jk/1.2.0 mod_webapp 1.2.0 configured -- resuming normal operations > > > Nota that mod_jk / mod_webapp coexist very well ;) >
try: ================================================= $ telnet punknix.homeip.net 80 Trying 61.18.154.226... Connected to punknix.homeip.net. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Fri, 03 May 2002 01:32:34 GMT Server: Apache/2.0.37-dev (Unix) mod_webapp/1.0.2 Content-Location: index.html.en Vary: negotiate,accept,accept-language,accept-charset TCN: choice Last-Modified: Wed, 01 May 2002 14:43:53 GMT ETag: "2a78e-5b0-c72f5c40;2a7a7-94f-c73e9e80" Accept-Ranges: bytes Content-Length: 1456 Connection: close Content-Type: text/html; charset=ISO-8859-1 Content-Language: en Expires: Fri, 03 May 2002 01:32:34 GMT Connection closed by foreign host. ================================================= I had been make this patch for a very long time (3/4/5 months). And send to this list several times... If you like, just grap my patch and comit. (wa_version.h must be placed in include/ dir, and change to *whatever* version you like!) Punky P.S. May be next time, I send the patch to bugzilla in order to draw more attention.
Index: mod_webapp.c =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c,v retrieving revision 1.31 diff -u -r1.31 mod_webapp.c --- mod_webapp.c 17 Jan 2002 17:02:13 -0000 1.31 +++ mod_webapp.c 30 Jan 2002 17:47:45 -0000 @@ -68,6 +68,7 @@ #include <http_protocol.h> #include <util_script.h> #include <wa.h> +#include <wa_version.h> /* ************************************************************************* */ /* GENERIC DECLARATIONS */ @@ -523,6 +524,11 @@ return(OK); } +static void wam_init_handler(server_rec *s, ap_pool *p) +{ + ap_add_version_component(WA_EXPOSED_VERSION); +} + /* List of all available Apache handlers */ static const handler_rec wam_handlers[] = { {"webapp-handler", wam_invoke}, @@ -532,7 +538,7 @@ /* Apache module declaration */ module MODULE_VAR_EXPORT webapp_module = { STANDARD_MODULE_STUFF, - NULL, /* module initializer */ + wam_init_handler, /* module initializer */ NULL, /* per-directory config creator */ NULL, /* dir config merger */ NULL, /* server config creator */
Index: mod_webapp.c =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c,v retrieving revision 1.7 diff -u -r1.7 mod_webapp.c --- mod_webapp.c 17 Jan 2002 17:02:13 -0000 1.7 +++ mod_webapp.c 30 Jan 2002 17:47:15 -0000 @@ -69,6 +69,7 @@ #include <http_protocol.h> #include <util_script.h> #include <wa.h> +#include <wa_version.h> #include <apr_tables.h> /* ************************************************************************* */ @@ -520,12 +521,20 @@ return DECLINED; } +static int wam_init_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, + server_rec *s) +{ + ap_add_version_component(p, WA_EXPOSED_VERSION); + return OK; +} + static void register_hooks(apr_pool_t *p) { ap_hook_handler(wam_invoke, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_translate_name(wam_match, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(wam_startup, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_map_to_storage(wam_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_post_config(wam_init_handler, NULL, NULL, APR_HOOK_MIDDLE); } /* Apache module declaration */
/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation <http://www.apache.org/>." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "WebApp", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact <[EMAIL PROTECTED]>. * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see <http://www.apache.org/>. * * * * ========================================================================= */ #ifndef _WA_VERSION_H_ #define _WA_VERSION_H_ /************** START OF AREA TO MODIFY BEFORE RELEASING *************/ #define WA_VERMAJOR 1 #define WA_VERMINOR 0 #define WA_VERFIX 2 #define WA_VERSTRING "1.0.2" /* Beta number */ #define WA_VERBETA 1 #define WA_BETASTRING "1" /* set WA_VERISRELEASE to 1 when release (do not forget to commit!) */ #define WA_VERISRELEASE 1 /************** END OF AREA TO MODIFY BEFORE RELEASING *************/ #define PACKAGE "mod_webapp/" /* Build WA_EXPOSED_VERSION and WA_VERSION */ #define WA_EXPOSED_VERSION_INT PACKAGE WA_VERSTRING #if ( WA_VERISRELEASE == 1 ) #define WA_EXPOSED_VERSION WA_EXPOSED_VERSION_INT #undef WA_VERBETA #define WA_VERBETA 255 #else #define WA_EXPOSED_VERSION WA_EXPOSED_VERSION_INT "-beta-" WA_BETASTRING #endif #define WA_MAKEVERSION(major, minor, fix, beta) (((major) << 24) + ((minor) << 16) + ((fix) << 8) + (beta)) #define WA_VERSION WA_MAKEVERSION(WA_VERMAJOR, WA_VERMINOR, WA_VERFIX, WA_VERBETA) #endif /* _WA_VERSION_H_ */
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>