diff --git a/src/conf.c b/src/conf.c index 21a661c..2ce1b2c 100644 --- a/src/conf.c +++ b/src/conf.c @@ -743,15 +743,8 @@ static HANDLE_FUNC (handle_listen) static HANDLE_FUNC (handle_errorfile) { - /* - * Because an integer is defined as ((0x)?[[:digit:]]+) _two_ - * match places are used. match[2] matches the full digit - * string, while match[3] matches only the "0x" part if - * present. This is why the "string" is located at - * match[4] (rather than the more intuitive match[3]. - */ unsigned long int err = get_long_arg (line, &match[MGROUP1+2]); - char *page = get_string_arg (line, &match[MGROUP1+4]); + char *page = get_string_arg (line, &match[MGROUP1+3]); if(add_new_errorpage (conf, page, err) < 0) { CP_WARN ("add_new_errorpage() failed: '%s'", page); @@ -974,7 +967,7 @@ static HANDLE_FUNC (handle_upstream) mi += 5; port = (int) get_long_arg (line, &match[mi]); - mi += 3; + mi += 2; if (match[mi].rm_so != -1) domain = get_string_arg (line, &match[mi]); diff --git a/src/conf_regex.h b/src/conf_regex.h index d87073a..2350aa2 100644 --- a/src/conf_regex.h +++ b/src/conf_regex.h @@ -12,7 +12,7 @@ #define WS SPACE "+" #define STR "\"([^\"]+)\"" #define BOOL "(yes|on|no|off)" -#define INT "(()" DIGIT "+)" +#define INT "(" DIGIT "+)" #define ALNUM "([-a-z0-9._]+)" #define USERNAME "([^:]*)" #define PASSWORD "([^@]*)"