process.c
changeset 16 e6a640ad2cc2
parent 15 2706fc514dea
child 18 d4ce82194b64
equal deleted inserted replaced
15:2706fc514dea 16:e6a640ad2cc2
   106 	printf( "%s%s", (rule->scheme ? rule->scheme : request->scheme), rule->host );
   106 	printf( "%s%s", (rule->scheme ? rule->scheme : request->scheme), rule->host );
   107 	if ( rule->port ) printf( ":%s", rule->port );
   107 	if ( rule->port ) printf( ":%s", rule->port );
   108 	printf( "%s", rule->path ? rule->path : request->path );
   108 	printf( "%s", rule->path ? rule->path : request->path );
   109 
   109 
   110 	printf("\n");
   110 	printf("\n");
       
   111 	fflush( stdout );
   111 	return;
   112 	return;
   112 }
   113 }
   113 
   114 
   114 
   115 
   115 /*
   116 /*
   132 		debug( 4, LOC, "Rule match \"%s\" (non regexp)\n", rule->path_re );
   133 		debug( 4, LOC, "Rule match \"%s\" (non regexp)\n", rule->path_re );
   133 		return( 1 );
   134 		return( 1 );
   134 	}
   135 	}
   135 
   136 
   136 	/* compile the regexp */
   137 	/* compile the regexp */
   137 	if ( (re_rv = regcomp( &re, rule->path_re, REG_EXTENDED | REG_NOSUB )) != 0 ) {
   138 	if ( (re_rv = regcomp( &re, rule->path_re, REG_EXTENDED | REG_NOSUB | REG_ICASE )) != 0 ) {
   138 		regerror( re_rv, &re, re_err, 128 );
   139 		regerror( re_rv, &re, re_err, 128 );
   139 		debug( 4, LOC, "Invalid regex: \"%s\": %s\n", rule->path_re, re_err );
   140 		debug( 4, LOC, "Invalid regex: \"%s\": %s\n", rule->path_re, re_err );
   140 		regfree( &re );
   141 		regfree( &re );
   141 		return( 0 );
   142 		return( 0 );
   142 	}
   143 	}