Browse Source

- fix small error related to non-numerical matching: don't skip them when
encountered at the beginning of the string in this mode


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5304 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 năm trước cách đây
mục cha
commit
9fa8affaae
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      modules/carrierroute/cr_func.c

+ 2 - 2
modules/carrierroute/cr_func.c

@@ -216,7 +216,7 @@ static int set_next_domain_recursor(struct dtrie_node_t *failure_node,
 	void **ret;
 	
 	/* Skip over non-digits.  */
-	while (re_uri.len > 0 && !isdigit(*re_uri.s)) {
+	while (re_uri.len > 0 && (!isdigit(*re_uri.s) && cr_match_mode == 10)) {
 		++re_uri.s;
 		--re_uri.len;
 	}
@@ -455,7 +455,7 @@ static int rewrite_uri_recursor(struct dtrie_node_t * node,
 	void **ret;
 	
 	/* Skip over non-digits.  */
-	while (re_pm.len > 0 && !isdigit(*re_pm.s)) {
+	while (re_pm.len > 0 && (!isdigit(*re_pm.s) && cr_match_mode == 10)) {
 		++re_pm.s;
 		--re_pm.len;
 	}