return NULL;
}
/* First try to find header name */
- begin = strchr (line, '=');
+ begin = strchr (line, '/');
if (begin != NULL) {
+ *begin = '\0';
+ end = strchr (line, '=');
+ *begin = '/';
+ if (end) {
+ *end = '\0';
+ result->header = memory_pool_strdup (pool, line);
+ result->type = REGEXP_HEADER;
+ *end = '=';
+ line = end;
+ }
+ }
+ else {
*begin = '\0';
result->header = memory_pool_strdup (pool, line);
result->type = REGEXP_HEADER;
line = begin;
}
/* Find begin of regexp */
- while (*line != '/') {
+ while (*line && *line != '/') {
line ++;
}
if (*line != '\0') {