tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1195851 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
Date Tue, 01 Nov 2011 07:06:33 GMT
Author: mturk
Date: Tue Nov  1 07:06:33 2011
New Revision: 1195851

URL: http://svn.apache.org/viewvc?rev=1195851&view=rev
Log:
Use only valid port numbers

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1195851&r1=1195850&r2=1195851&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov  1 07:06:33 2011
@@ -1866,7 +1866,7 @@ static DWORD handle_notify_event(PHTTP_F
     const char *worker = NULL;
     rule_extension_t *extensions;
     int worker_index = -1;
-    int port;
+    int port = 0;
     jk_pool_atom_t pbuf[HUGE_POOL_SIZE];
     jk_pool_t pool;
 
@@ -1944,9 +1944,9 @@ static DWORD handle_notify_event(PHTTP_F
     len = ISIZEOF(szHB) - 1;    
     if (pfc->GetServerVariable(pfc, "SERVER_NAME", &szHB[1], &len) &&
len > 1) {
         len = ISIZEOF(szPB);
-        pfc->GetServerVariable(pfc, "SERVER_PORT", szPB, &len);
-        port = atoi(szPB);
-        if (port != 80 && port != 443) {
+        if (pfc->GetServerVariable(pfc, "SERVER_PORT", szPB, &len))
+            port = atoi(szPB);
+        if (port != 0 && port != 80 && port != 443) {
             host = jk_pool_strcatv(&pool, szHB, ":", szPB, NULL);
         }
         else



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


Mime
View raw message