Code: Select all
config.uri_match_fn = httpd_uri_match_wildcard;
Code: Select all
* Example:
* - * matches everything
* - /foo/? matches /foo and /foo/
* - /foo/\* (sans the backslash) matches /foo/ and /foo/bar, but not /foo or /fo
* - /foo/?* or /foo/\*? (sans the backslash) matches /foo/, /foo/bar, and also /foo, but not /foox or /fo
*
* The special characters "?" and "*" anywhere else in the template will be taken literally.
Code: Select all
/*.html
/*.css
原型如下:
Code: Select all
typedefbool (*httpd_uri_match_func_t)(const char *reference_uri, const char *uri_to_match, size_t match_upto)
Function prototype for URI matching.
Return
true on match
Parameters
[in] reference_uri: URI/template with respect to which the other URI is matched
[in] uri_to_match: URI/template being matched to the reference URI/template
[in] match_upto: For specifying the actual length of uri_to_match up to which the matching algorithm is to be applied (The maximum value is strlen(uri_to_match), independent of the length of reference_uri)