tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat/src/native/mod_jk/iis jk_isapi_plugin.c
Date Sat, 08 Dec 2001 15:40:59 GMT
larryi      01/12/08 07:40:59

  Modified:    src/native/mod_jk/iis jk_isapi_plugin.c
  Log:
  Fix bug where if uri is shortened by un-escaping or normalizing, the query
  gets lost.
  
  Also converted some tabs to spaces.
  
  Revision  Changes    Path
  1.10      +24 -16    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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_isapi_plugin.c	2001/10/01 00:27:11	1.9
  +++ jk_isapi_plugin.c	2001/12/08 15:40:59	1.10
  @@ -57,7 +57,7 @@
    * Description: ISAPI plugin for IIS/PWS                                   *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Ignacio J. Ortega <nacho@apache.org>                       *
  - * Version:     $Revision: 1.9 $                                           *
  + * Version:     $Revision: 1.10 $                                           *
    ***************************************************************************/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -594,22 +594,30 @@
               }
               getparents(uri);
   
  -			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(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 = '?';
  +                char *querytmp = uri + strlen(uri);
  +                *querytmp++ = '?';
  +                query++;
  +                /* if uri was shortened, move the query characters */
  +                if (querytmp != query) {
  +                    while (*query != '\0')
  +                        *querytmp++ = *query++;
  +                    *querytmp = '\0';
  +                }
               }
   
               if(worker) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message