Changeset 1621 for cherokee/trunk/cherokee
- Timestamp:
- 07/08/08 13:37:00 (3 months ago)
- Files:
-
- cherokee/trunk/cherokee/handler_redir.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/cherokee/handler_redir.c
r1614 r1621 110 110 */ 111 111 list_for_each (i, &HDL_REDIR_PROPS(n)->regex_list) { 112 cint_t rc ;112 cint_t rc = 0; 113 113 char *subject; 114 114 cint_t subject_len; … … 130 130 subject_len = strlen (subject); 131 131 132 /* It might be matched previosly in the request parsing.. 133 */ 134 if (list->re == NULL) { 135 memcpy (ovector, 132 /* Case 1: No conn substitution, No local regex 133 */ 134 if ((list->re == NULL) && 135 (conn->regex_match_ovector == NULL)) 136 { 137 TRACE (ENTRIES, "Using conn->ovector, size=%d\n", rc); 138 } 139 140 /* Case 2: Cached conn substitution 141 */ 142 else if (list->re == NULL) { 143 memcpy (ovector, 136 144 conn->regex_match_ovector, 137 OVECTOR_LEN * sizeof( int));138 145 OVECTOR_LEN * sizeof(cint_t)); 146 139 147 rc = *conn->regex_match_ovecsize; 140 148 TRACE (ENTRIES, "Using conn->ovector, size=%d\n", rc); 141 142 } else { 149 } 150 151 /* Case 3: Use the rule-subentry regex 152 */ 153 else { 143 154 rc = pcre_exec (list->re, NULL, subject, subject_len, 0, 0, ovector, OVECTOR_LEN); 144 155 if (rc == 0) {