--- apache-1.3/mod_webapp.c Wed Feb 13 17:53:58 2002
+++ apache-1.3/mod_webapp.c.new Sat Mar 23 17:30:05 2002
@@ -227,6 +227,16 @@
     return(NULL);
 }
 
+/* Allow the option to override certain urls */
+static const char *wam_directive_ignore(cmd_parms *parms, void *mconfig, char *w) {
+ wa_virtualhost *vhost = NULL;
+ vhost = (wa_virtualhost *)ap_get_module_config(parms->server->module_config, &webapp_module);
+ if(wa_ignore(vhost, w) != NULL) {
+  ap_log_error(APLOG_MARK,APLOG_NOERRNO|APLOG_ERR, parms->server,"Cannot add new ignore url");
+ }
+ return NULL;
+}
+
 /* The list of Directives for the WebApp module */
 static const command_rec wam_directives[] = {
     {
@@ -250,7 +260,14 @@
         RSRC_CONF,                  /* where available */
         TAKE3,                      /* arguments */
         "<name> <connection> <uri-path>"
-    }, {NULL}
+    }, {
+ "WebAppIgnore", 
+ wam_directive_ignore,
+ NULL,
+ RSRC_CONF,
+ ITERATE,
+ "<ignore pattern>"
+ }, {NULL}
 
 };
 
@@ -410,7 +427,7 @@
 
     /* Set the webapp request structure into Apache's request structure */
     ap_set_module_config(r->request_config, &webapp_module, appl);
-    return(OK);
+    return(DECLINED);
 }
 
 /* Handle the current request */
@@ -420,6 +437,7 @@
     wa_application *appl=NULL;
     wa_request *req=NULL;
     const char *msg=NULL;
+ ignore_urls *igurls = NULL;
     char *stmp=NULL;
     char *ctmp=NULL;
     char *ssl_temp;
@@ -431,6 +449,14 @@
     /* Try to get a hold on the webapp request structure */
     appl=(wa_application *)ap_get_module_config(r->request_config,
                                                 &webapp_module);
+
+ /* Now check for ignored urls */
+ for(igurls = appl->host->ignore_urls; igurls; igurls = igurls->next) {
+ if(apr_fnmatch(igurls->url, r->uri) == APR_SUCCESS) {
+ return(DECLINED);
+ }
+ }
+
     if (appl==NULL) return(DECLINED);
 
     /* Allocate the webapp request structure */
--- lib/wa_config.c Wed Feb 13 17:53:58 2002
+++ lib/wa_config.c.new Sat Mar 23 17:28:29 2002
@@ -121,6 +121,7 @@
     host->name=apr_pstrdup(wa_pool,n);
     host->port=p;
     host->apps=NULL;
+ host->ignore_urls = NULL; 
 
     /* Done! :) */
     wa_debug(WA_MARK,"Created virtual host \"%s:%d\"",host->name,host->port);
@@ -168,4 +169,14 @@
              n,p,a);
     *c=conn;
     return(NULL);
+}
+
+/* Add an ignored url to a virtual host */
+const char *wa_ignore(wa_virtualhost *vhost, char *url) {
+ ignore_urls *ig = vhost->ignore_urls;
+ ignore_urls *igu = apr_palloc(wa_pool, sizeof(ignore_urls));
+ igu->url = apr_pstrdup(wa_pool, url);
+ igu->next = ig;
+ vhost->ignore_urls = igu; 
+ return(NULL);
 }
--- include/wa_config.h Wed Feb 13 17:53:58 2002
+++ include/wa_config.h.new Sat Mar 23 17:36:32 2002
@@ -63,6 +63,14 @@
 #ifndef _WA_CONFIG_H_
 #define _WA_CONFIG_H_
 
+/** 
+ * What a 'orrible hack
+ */
+typedef struct {
+ char *url;
+ void *next;
+} ignore_urls;
+
 /**
  * The WebApp Library connection structure.
  * <br>
@@ -91,6 +99,8 @@
     char *name;
     /** The virtual host port. */
     int port;
+ /* Patterns to ignore */
+ ignore_urls *ignore_urls;
     /** The list of all applications deployed in this virtual hosts. */
     wa_chain *apps;
 };
@@ -167,5 +177,8 @@
                            const char *n,
                            const char *p,
                            const char *a);
+
+/* Ignore certain urls */
+const char *wa_ignore(wa_virtualhost *vhost, char *url);
 
 #endif /* ifndef _WA_CONFIG_H_ */

