Use mg_parse_uri in ws, add mg_mk_str function

PUBLISHED_FROM=650ce03aaf53f4c501fbb77a3ae0b584278e299a
This commit is contained in:
Alexander Alashkin 2016-01-13 18:45:09 +01:00 committed by rojer
parent 67521fd9f6
commit b56e985ccc
2 changed files with 8 additions and 0 deletions

View File

@ -7115,6 +7115,11 @@ int mg_match_prefix(const char *pattern, int pattern_len, const char *str) {
}
return j;
}
struct mg_str mg_mk_str(const char *s) {
struct mg_str ret = {s, strlen(s)};
return ret;
}
#ifdef NS_MODULE_LINES
#line 1 "./src/json-rpc.c"
/**/

View File

@ -1475,6 +1475,9 @@ const char *mg_next_comma_list_entry(const char *list, struct mg_str *val,
*/
int mg_match_prefix(const char *pattern, int pattern_len, const char *str);
/* A helper function for creating mg_str struct from plain C string */
struct mg_str mg_mk_str(const char *s);
#ifdef __cplusplus
}
#endif /* __cplusplus */