[pubcookie-dev] WEBISO CVS update: ryanc; PubCookieFilter.h,1.1.2.8,1.1.2.9

Ryan Campbell ryanc at cac.washington.edu
Thu Jul 10 11:54:34 PDT 2003


Update of /usr/local/cvsroot/webiso/pubcookie/src/Win32
 In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv671
 
 Modified Files:
       Tag: uwash-stable
 	PubCookieFilter.cpp PubCookieFilter.h 
 Log Message:
 Fixed typo and removed global variable Error_Page
 



Index: webiso/pubcookie/src/Win32/PubCookieFilter.cpp
diff -c webiso/pubcookie/src/Win32/PubCookieFilter.cpp:1.2.2.12 webiso/pubcookie/src/Win32/PubCookieFilter.cpp:1.2.2.13
*** webiso/pubcookie/src/Win32/PubCookieFilter.cpp:1.2.2.12	Mon Mar 31 15:55:59 2003
--- webiso/pubcookie/src/Win32/PubCookieFilter.cpp	Thu Jul 10 11:54:32 2003
***************
*** 82,88 ****
  
     DebugMsg((DEST,"\n*** %s\n\n",string2));
  }
! 
  VOID Close_Debug_Trace ()
  {
  	time_t ltime;
--- 82,89 ----
  
     DebugMsg((DEST,"\n*** %s\n\n",string2));
  }
! 
! //Not thread-safe, modifies global variables
  VOID Close_Debug_Trace ()
  {
  	time_t ltime;
***************
*** 114,120 ****
  		Max_Bytes_Recvd    = 0;
  	}
  }
! 
  BOOL Open_Debug_Trace ()
  {
      char szName[256], szBuff[1024];
--- 115,122 ----
  		Max_Bytes_Recvd    = 0;
  	}
  }
! 
! //Not thread-safe, modifies global variable
  BOOL Open_Debug_Trace ()
  {
      char szName[256], szBuff[1024];
***************
*** 173,179 ****
  }
  
  
! 
  BOOL Reset_Defaults () 
  {
  	char szBuff[MAX_PATH];
--- 175,181 ----
  }
  
  
! //Not thread safe, modifies global variables
  BOOL Reset_Defaults () 
  {
  	char szBuff[MAX_PATH];
***************
*** 240,246 ****
  	return OK;
  
  }
! 
  BOOL Pubcookie_Init () 
  {
      char szBuff[1024];
--- 242,249 ----
  	return OK;
  
  }
! 
! //Not thread-safe, modifies global variables
  BOOL Pubcookie_Init () 
  {
      char szBuff[1024];
***************
*** 264,278 ****
  	Max_Bytes_Sent     = 0;
  	Max_Bytes_Recvd    = 0;
  
- 	// filter won't run calling routine below for some reason
- 
- //	rslt=SHGetFolderPath(NULL,CSIDL_SYSTEM,NULL,0,System_Path);
- 
- 	rslt = GetEnvironmentVariable ("windir",szBuff,MAX_PATH);
- 	sprintf(SystemRoot,"%s\\system32",szBuff);
- 
- //	DebugMsg((DEST,"  SystemRoot    = %s, rslt = %d\n",SystemRoot,rslt));
- 
  	if (!Reset_Defaults()) {
  		return FALSE;
  	}
--- 267,272 ----
***************
*** 547,557 ****
  int Bad_User (HTTP_FILTER_CONTEXT* pFC)
  {
  	char szTemp[1024];
! 	DWORD dwSize;
  
- 	DebugMsg((DEST," Bad_User\n")); 
  
! 	if ( strlen(Error_Page) == 0 ) {
  
  		pFC->ServerSupportFunction(pFC,SF_REQ_SEND_RESPONSE_HEADER,
  								"200 OK",NULL,NULL);
--- 541,555 ----
  int Bad_User (HTTP_FILTER_CONTEXT* pFC)
  {
  	char szTemp[1024];
! 	DWORD dwSize;
! 	pubcookie_dir_rec* dcfg;
! 
! 	dcfg = (pubcookie_dir_rec *)pFC->pFilterContext;
  
  
! 	DebugMsg((DEST," Bad_User\n")); 
! 
! 	if ( strlen(dcfg->Error_Page) == 0 ) {
  
  		pFC->ServerSupportFunction(pFC,SF_REQ_SEND_RESPONSE_HEADER,
  								"200 OK",NULL,NULL);
***************
*** 564,570 ****
  		pFC->WriteClient (pFC, szTemp, &dwSize, 0);
  
  	} else {
! 		Redirect(pFC, Error_Page);
  	}
  
  	return OK;
--- 562,568 ----
  		pFC->WriteClient (pFC, szTemp, &dwSize, 0);
  
  	} else {
! 		Redirect(pFC, dcfg->Error_Page);
  	}
  
  	return OK;
***************
*** 655,661 ****
  	//	else	
  		return NULL;
  	}
! 
  	if ( strlen(cookie_data) > Max_Cookie_Size )
  		Max_Cookie_Size = strlen(cookie_data);
  
--- 653,660 ----
  	//	else	
  		return NULL;
  	}
! 
! 	//Not thread safe
  	if ( strlen(cookie_data) > Max_Cookie_Size )
  		Max_Cookie_Size = strlen(cookie_data);
  
***************
*** 1553,1559 ****
  								NULL,Notify_Flags,NULL);
  		return SF_STATUS_REQ_NEXT_NOTIFICATION;
  	}
! 
  	Total_Requests++;
  
  	time(&ltime);
--- 1552,1558 ----
  								NULL,Notify_Flags,NULL);
  		return SF_STATUS_REQ_NEXT_NOTIFICATION;
  	}
! 	//not thread safe
  	Total_Requests++;
  
  	time(&ltime);
***************
*** 1622,1628 ****
  	pHeaderInfo->GetHeader(pFC, "Content-Length:",
  							szBuff, &dwBuffSize);
  	DebugMsg((DEST,"  Content_Length : %s\n",szBuff));
! 
  	if ( (unsigned int)atoi(szBuff) > Max_Content_Length )
  		Max_Content_Length = atoi(szBuff);
  
--- 1621,1628 ----
  	pHeaderInfo->GetHeader(pFC, "Content-Length:",
  							szBuff, &dwBuffSize);
  	DebugMsg((DEST,"  Content_Length : %s\n",szBuff));
! 
! 	//not thread safe
  	if ( (unsigned int)atoi(szBuff) > Max_Content_Length )
  		Max_Content_Length = atoi(szBuff);
  
***************
*** 1966,1972 ****
  	DebugMsg((DEST,"  BytesSent     : %d\n",pLogInfo->dwBytesSent));
  	DebugMsg((DEST,"  BytesReceived : %d\n",pLogInfo->dwBytesRecvd));
  	DebugMsg((DEST,"  ProcTime      : %d\n",pLogInfo->msTimeForProcessing));
! 
  	if ( strlen(pLogInfo->pszTarget) > Max_Url_Length )
  		Max_Url_Length = strlen(pLogInfo->pszTarget);
  
--- 1966,1973 ----
  	DebugMsg((DEST,"  BytesSent     : %d\n",pLogInfo->dwBytesSent));
  	DebugMsg((DEST,"  BytesReceived : %d\n",pLogInfo->dwBytesRecvd));
  	DebugMsg((DEST,"  ProcTime      : %d\n",pLogInfo->msTimeForProcessing));
! 
! 	//This section not thread-safe
  	if ( strlen(pLogInfo->pszTarget) > Max_Url_Length )
  		Max_Url_Length = strlen(pLogInfo->pszTarget);
  


Index: webiso/pubcookie/src/Win32/PubCookieFilter.h
diff -c webiso/pubcookie/src/Win32/PubCookieFilter.h:1.1.2.8 webiso/pubcookie/src/Win32/PubCookieFilter.h:1.1.2.9
*** webiso/pubcookie/src/Win32/PubCookieFilter.h:1.1.2.8	Fri Mar 28 13:48:26 2003
--- webiso/pubcookie/src/Win32/PubCookieFilter.h	Thu Jul 10 11:54:32 2003
***************
*** 1,5 ****
  
! #define Pubcookie_Version "Pubcookie ISAPI Filter, 2.7.8"
  
  
  char Instance[3];
--- 1,5 ----
  
! #define Pubcookie_Version "Pubcookie ISAPI Filter, 2.7.9"
  
  
  char Instance[3];
***************
*** 8,16 ****
  char Debug_Dir[MAX_PATH];
  
  int  Ignore_Poll;     // Set to "1" to ignore Network Dispatcher "/" polls
- //char Web_Login[MAX_PATH];  // default is https://weblogin.washington.edu/
- //char Enterprise_Domain[MAX_PATH];  // default is ".washington.edu"
- char Error_Page[MAX_PATH]; // Redirect user to this page on fatal errors
  
  typedef struct {
  	char				*g_certfile;
--- 8,13 ----



end of message


More information about the pubcookie-dev mailing list