use pattern with slug

This commit is contained in:
c9s 2014-05-18 14:42:02 +08:00
parent cda897a9a7
commit c5198a91c7
2 changed files with 2 additions and 0 deletions

View file

@ -41,6 +41,7 @@ r3_tree_insert_pathl(n , "/zoo" , strlen("/zoo") , NULL, &route_data
r3_tree_insert_pathl(n , "/foo/bar" , strlen("/foo/bar") , NULL, &route_data ); r3_tree_insert_pathl(n , "/foo/bar" , strlen("/foo/bar") , NULL, &route_data );
r3_tree_insert_pathl(n , "/bar" , strlen("/bar") , NULL, &route_data ); r3_tree_insert_pathl(n , "/bar" , strlen("/bar") , NULL, &route_data );
r3_tree_insert_pathl(n , "/post/{id}" , strlen("/post/{id}") , NULL, &route_data ); r3_tree_insert_pathl(n , "/post/{id}" , strlen("/post/{id}") , NULL, &route_data );
r3_tree_insert_pathl(n , "/user/{id}" , strlen("/user/{id:\\d+}") , NULL, &route_data );
// let's compile the tree! // let's compile the tree!
r3_tree_compile(n); r3_tree_compile(n);

View file

@ -170,3 +170,4 @@
1400394385,10413209.43 1400394385,10413209.43
1400394571,8615372.65 1400394571,8615372.65
1400394590,10964999.94 1400394590,10964999.94
1400394658,11173658.86

1 1400242718 5649455.80
170 1400394385 10413209.43
171 1400394571 8615372.65
172 1400394590 10964999.94
173 1400394658 11173658.86