agoo_server_add_func_hook(agooErr	err,
			  agooMethod	method,
			  const char	*pattern,
			  void		(*func)(agooReq req),
			  agooQueue	queue,
			  bool		quick) {
    agooHook	h;
    agooHook	prev = NULL;
    agooHook	hook = agoo_hook_func_create(method, pattern, func, queue);

    if (NULL == hook) {
	return AGOO_ERR_MEM(err, "HTTP Server Hook");
    }
    hook->no_queue = quick;
    for (h = agoo_server.hooks; NULL != h; h = h->next) {
	prev = h;
    }
    if (NULL != prev) {
	prev->next = hook;
    } else {
	agoo_server.hooks = hook;
    }
    return AGOO_ERR_OK;
}
agoo_server_add_func_hook(agooErr	err,
			  agooMethod	method,
			  const char	*pattern,
			  void		(*func)(agooReq req),
			  agooQueue	queue,
			  bool		quick) {
    agooHook	h;
    agooHook	prev = NULL;
    agooHook	hook = agoo_hook_func_create(method, pattern, func, queue);

    if (NULL == hook) {
	return AGOO_ERR_MEM(err, "HTTP Server Hook");
    }
    hook->no_queue = quick;
    for (h = agoo_server.hooks; NULL != h; h = h->next) {
	prev = h;
    }
    if (NULL != prev) {
	prev->next = hook;
    } else {
	agoo_server.hooks = hook;
    }
    return AGOO_ERR_OK;
}