tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat/src/native/mod_jk/iis jk_isapi_plugin.c
Date Thu, 13 Sep 2001 00:07:39 GMT
nacho       01/09/12 17:07:39

  Modified:    src/native/mod_jk/iis jk_isapi_plugin.c
  Log:
  Virtual server support for IIS
  
  This patch adds some syntax sugar to uriworkermap.properties file format
  to allow fine grained control over redirection of tomcat contexts to IIS
  virtual hosts, allowing a syntax like :
  
  /www.somevirtualhost.com/context/*.jsp=ajp13
  
  in UWM.P file.. in addition to the old one of :
  
  /context/*.jsp=ajp13
  
  The old syntax comprises the mapping for the entire server, that is this
  context are honored in all IIS virtual servers..
  
  The new syntax permits to map a context against a unique virtual server, or a group of them..
  
  Revision  Changes    Path
  1.4       +22 -7     jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_isapi_plugin.c	2001/09/02 07:27:27	1.3
  +++ jk_isapi_plugin.c	2001/09/13 00:07:39	1.4
  @@ -56,7 +56,8 @@
   /***************************************************************************
    * Description: ISAPI plugin for IIS/PWS                                   *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.3 $                                               *
  + * Author:      Ignacio J. Ortega <nacho@apache.org>                       *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
   #include <httpext.h>
  @@ -402,9 +403,13 @@
       if(is_inited &&
          (SF_NOTIFY_PREPROC_HEADERS == dwNotificationType)) { 
           PHTTP_FILTER_PREPROC_HEADERS p = (PHTTP_FILTER_PREPROC_HEADERS)pvNotification;
  -        char uri[INTERNET_MAX_URL_LENGTH]; 
  +        char uri[INTERNET_MAX_URL_LENGTH];
  +		char snuri[INTERNET_MAX_URL_LENGTH]="/";
  +		char Host[INTERNET_MAX_URL_LENGTH];
  +
           char *query;
           DWORD sz = sizeof(uri);
  +        DWORD szHost = sizeof(Host);
   
           jk_log(logger, JK_LOG_DEBUG, 
                  "HttpFilterProc started\n");
  @@ -422,15 +427,25 @@
           }
   
           if(strlen(uri)) {
  -            char *worker;
  +            char *worker=0;
               query = strchr(uri, '?');
               if(query) {
                   *query = '\0';
               }
  -            jk_log(logger, JK_LOG_DEBUG, 
  -                   "In HttpFilterProc test redirection of %s\n", 
  -                   uri);
  -            worker = map_uri_to_worker(uw_map, uri, logger);                
  +			if(p->GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) {
  +				strcat(snuri,Host);
  +				strcat(snuri,uri);
  +				jk_log(logger, JK_LOG_DEBUG, 
  +					   "In HttpFilterProc Virtual Host redirection of %s\n", 
  +					   snuri);
  +				worker = map_uri_to_worker(uw_map, snuri, logger);                
  +			}
  +			if (!worker) {
  +				jk_log(logger, JK_LOG_DEBUG, 
  +					   "In HttpFilterProc test Default redirection of %s\n", 
  +					   uri);
  +				worker = map_uri_to_worker(uw_map, uri, logger);
  +			}
               if(query) {
                   *query = '?';
               }
  
  
  

Mime
View raw message