*revc_buf++ == 'E' && *revc_buf++ == 'T')
{
str_ok = true;
+ /* skip the space and "/" */
revc_buf += 2;
}
}
if (!strcmp(table[i].name, ext))
break;
}
- else /* (table[i].type == CGI_MATCH_NAME) */
+ else if (table[i].type == CGI_MATCH_NAME)
{
LOG_INFO("Match all name %s\n", name);
+ if (strstr(name, table[i].name) != NULL)
+ break;
+ }
+ else /* (table[i].type == CGI_MATCH_WORD) */
+ {
+ LOG_INFO("Match all word %s\n", name);
if (!strcmp(table[i].name, name))
break;
}
#define CGI_MATCH_NONE 0
-#define CGI_MATCH_NAME 1 ///< Select item in table only if string match
+#define CGI_MATCH_WORD 1 ///< Select item in table only if string match
#define CGI_MATCH_EXT 2 ///< Select item in table if the extention match
+#define CGI_MATCH_NAME 3 ///< Select item in table if the string is content
void http_getPageName(const char *revc_buf, size_t recv_len, char *page_name, size_t len);