You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2011/11/01 08:06:33 UTC
svn commit: r1195851 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
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