forked from cory/tildefriends
Sort of barely starting to call httpd callbacks with the new implementation.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4686 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -96,7 +96,9 @@ bool _http_find_handler(tf_http_t* http, const char* path, tf_http_callback_t**
|
||||
{
|
||||
for (int i = 0; i < http->handlers_count; i++)
|
||||
{
|
||||
if (!http->handlers[i].pattern || strcmp(path, http->handlers[i].pattern) == 0)
|
||||
if (!http->handlers[i].pattern ||
|
||||
strcmp(path, http->handlers[i].pattern) == 0 ||
|
||||
(strncmp(path, http->handlers[i].pattern, strlen(http->handlers[i].pattern)) == 0 && path[strlen(http->handlers[i].pattern)] == '/'))
|
||||
{
|
||||
*out_callback = http->handlers[i].callback;
|
||||
*out_user_data = http->handlers[i].user_data;
|
||||
|
Reference in New Issue
Block a user