[Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.24.2.2,1.24.2.3

Karl DeBisschop kdebisschop at users.sourceforge.net
Wed Jun 11 03:40:18 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv14242

Modified Files:
      Tag: r1_3_0
	check_http.c 
Log Message:
character classes were wrong for URI_PATH etc:
1) must include ?&#; for PATH
2) POSIX states "If a '-' is in the scanlist and is not the first character, nor the second where the first character is a '^' , nor the last character, the behavior is implementation-defined"


Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.24.2.2
retrieving revision 1.24.2.3
diff -C2 -r1.24.2.2 -r1.24.2.3
*** check_http.c	9 May 2003 03:22:37 -0000	1.24.2.2
--- check_http.c	11 Jun 2003 10:39:31 -0000	1.24.2.3
***************
*** 183,189 ****
  #define HDR_LOCATION "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: "
  #define URI_HTTP "%[HTPShtps]://"
! #define URI_HOST "%[a-zA-Z0-9.-]"
! #define URI_PORT ":%[0-9]"
! #define URI_PATH "%[/a-zA-Z0-9._-=@,]"
  
  enum {
--- 183,189 ----
  #define HDR_LOCATION "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: "
  #define URI_HTTP "%[HTPShtps]://"
! #define URI_HOST "%[-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]"
! #define URI_PORT ":%[-0123456789]"
! #define URI_PATH "%[-_=@,?&#;/.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]"
  
  enum {





More information about the Commits mailing list