• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ buffer_is_equal_string函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中buffer_is_equal_string函数的典型用法代码示例。如果您正苦于以下问题:C++ buffer_is_equal_string函数的具体用法?C++ buffer_is_equal_string怎么用?C++ buffer_is_equal_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了buffer_is_equal_string函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mod_setenv_patch_connection

static int mod_setenv_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(request_header);
	PATCH(response_header);
	PATCH(environment);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("setenv.add-request-header"))) {
				PATCH(request_header);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("setenv.add-response-header"))) {
				PATCH(response_header);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("setenv.add-environment"))) {
				PATCH(environment);
			}
		}
	}

	return 0;
}
开发者ID:jonahglover,项目名称:lighttpd1.4,代码行数:32,代码来源:mod_setenv.c


示例2: mod_magnet_patch_connection

static int mod_magnet_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(url_raw);
	PATCH(physical_path);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN(MAGNET_CONFIG_RAW_URL))) {
				PATCH(url_raw);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN(MAGNET_CONFIG_PHYSICAL_PATH))) {
				PATCH(physical_path);
			}
		}
	}

	return 0;
}
开发者ID:jonahglover,项目名称:lighttpd1.4,代码行数:29,代码来源:mod_magnet.c


示例3: mod_cgi_patch_connection

static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH_OPTION(cgi);
	PATCH_OPTION(execute_all);
	PATCH_OPTION(execute_x_only);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN(CONFIG_ASSIGN))) {
				PATCH_OPTION(cgi);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN(CONFIG_EXECUTE_ALL))) {
				PATCH_OPTION(execute_all);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN(CONFIG_EXECUTE_X_ONLY))) {
				PATCH_OPTION(execute_x_only);
			}
		}
	}

	return 0;
}
开发者ID:Fumon,项目名称:lighttpd-Basic-auth-hack,代码行数:32,代码来源:mod_cgi.c


示例4: mod_lisp_patch_connection

static int mod_lisp_patch_connection(server *srv, connection *con, plugin_data *p)
#define PATCH(x)  p->conf.x = s->x
{
  size_t i, j;
  plugin_config *s = p->config_storage[0];

  PATCH(LispUseHandler);
  PATCH(LispServerId);
  PATCH(LispServerPort);
  PATCH(LispServerIP);
  PATCH(loglevel);
  PATCH(LispSocketPoolSize);

  /* Skip the first, global context. */
  for (i = 1; i < srv->config_context->used; i++) {
    data_config *dc = (data_config *)srv->config_context->data[i];
    s = p->config_storage[i];
    if (!config_check_cond(srv, con, dc)) continue;  /* Condition did not match. */
    for (j = 0; j < dc->value->used; j++) {          /* Merge config. */
      data_unset *du = dc->value->data[j];
      if (buffer_is_equal_string(du->key, CONST_STR_LEN("lisp.use-handler")))
        PATCH(LispUseHandler);
      else if (buffer_is_equal_string(du->key, CONST_STR_LEN("lisp.server-id")))
        PATCH(LispServerId);
      else if (buffer_is_equal_string(du->key, CONST_STR_LEN("lisp.server-ip")))
        PATCH(LispServerIP);
      else if (buffer_is_equal_string(du->key, CONST_STR_LEN("lisp.server-port")))
        PATCH(LispServerPort);
      else if (buffer_is_equal_string(du->key, CONST_STR_LEN("lisp.log-level")))
        PATCH(loglevel);
    }
  }

  return 0;
}
开发者ID:agrostis,项目名称:mod_lisp-lighttpd,代码行数:35,代码来源:mod_lisp.c


示例5: mod_bitsvhd_patch_connection

static int mod_bitsvhd_patch_connection(server *srv, connection *con,
		plugin_data *p)
{
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(activate);
	PATCH(sparse);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key,
					CONST_STR_LEN("bitsvhd.activate"))) {
				PATCH(activate);
			} else if (buffer_is_equal_string(du->key,
					CONST_STR_LEN("bitsvhd.sparse"))) {
				PATCH(sparse);
			}
		}
	}

	return 0;
}
开发者ID:2xyo,项目名称:transfervm,代码行数:33,代码来源:mod_bitsvhd.c


示例6: mod_usertrack_patch_connection

static int mod_usertrack_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(cookie_name);
	PATCH(cookie_domain);
	PATCH(cookie_max_age);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("usertrack.cookie-name"))) {
				PATCH(cookie_name);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("usertrack.cookie-max-age"))) {
				PATCH(cookie_max_age);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("usertrack.cookie-domain"))) {
				PATCH(cookie_domain);
			}
		}
	}

	return 0;
}
开发者ID:HiWong,项目名称:lighttpd1.4,代码行数:32,代码来源:mod_usertrack.c


示例7: mod_secdownload_patch_connection

static int mod_secdownload_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(secret);
	PATCH(doc_root);
	PATCH(uri_prefix);
	PATCH(timeout);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("secdownload.secret"))) {
				PATCH(secret);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("secdownload.document-root"))) {
				PATCH(doc_root);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("secdownload.uri-prefix"))) {
				PATCH(uri_prefix);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("secdownload.timeout"))) {
				PATCH(timeout);
			}
		}
	}

	return 0;
}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:35,代码来源:mod_secure_download.c


示例8: mod_staticfile_patch_connection

static int mod_staticfile_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(exclude_ext);
	PATCH(etags_used);
	PATCH(disable_pathinfo);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("static-file.exclude-extensions"))) {
				PATCH(exclude_ext);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("static-file.etags"))) {
				PATCH(etags_used);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("static-file.disable-pathinfo"))) {
				PATCH(disable_pathinfo);
			}
		}
	}

	return 0;
}
开发者ID:lilohuang,项目名称:lighttpd1.4,代码行数:32,代码来源:mod_staticfile.c


示例9: run_buffer_path_simplify

static void run_buffer_path_simplify(buffer *psrc, buffer *pdest, const char *in, size_t in_len, const char *out, size_t out_len) {
	buffer_copy_string_len(psrc, in, in_len);

	buffer_path_simplify(pdest, psrc);

	if (!buffer_is_equal_string(pdest, out, out_len)) {
		fprintf(stderr,
			"%s.%d: buffer_path_simplify('%s') failed: expected '%s', got '%s'\n",
			__FILE__,
			__LINE__,
			in,
			out,
			pdest->ptr ? pdest->ptr : "");
		fflush(stderr);
		abort();
	} else {
		if (psrc != pdest) buffer_copy_buffer(psrc, pdest);
		buffer_path_simplify(pdest, psrc);

		if (!buffer_is_equal_string(pdest, out, out_len)) {
			fprintf(stderr,
				"%s.%d: buffer_path_simplify('%s') failed - not idempotent: expected '%s', got '%s'\n",
				__FILE__,
				__LINE__,
				in,
				out,
				pdest->ptr ? pdest->ptr : "");
			fflush(stderr);
			abort();
		}
	}
}
开发者ID:gstrauss,项目名称:lighttpd1.4,代码行数:32,代码来源:test_buffer.c


示例10: proxy_create_env

static int proxy_create_env(server *srv, handler_ctx *hctx) {
	size_t i;

	connection *con   = hctx->remote_conn;
	buffer *b;

	/* build header */

	b = buffer_init();

	/* request line */
	buffer_copy_string(b, get_http_method_name(con->request.http_method));
	buffer_append_string_len(b, CONST_STR_LEN(" "));

	buffer_append_string_buffer(b, con->request.uri);
	buffer_append_string_len(b, CONST_STR_LEN(" HTTP/1.0\r\n"));

	proxy_append_header(con, "X-Forwarded-For", (char *)inet_ntop_cache_get_ip(srv, &(con->dst_addr)));
	/* http_host is NOT is just a pointer to a buffer
	 * which is NULL if it is not set */
	if (!buffer_string_is_empty(con->request.http_host)) {
		proxy_set_header(con, "X-Host", con->request.http_host->ptr);
	}
	proxy_set_header(con, "X-Forwarded-Proto", con->uri.scheme->ptr);

	/* request header */
	for (i = 0; i < con->request.headers->used; i++) {
		data_string *ds;

		ds = (data_string *)con->request.headers->data[i];

		if (!buffer_is_empty(ds->value) && !buffer_is_empty(ds->key)) {
			if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Connection"))) continue;
			if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Proxy-Connection"))) continue;

			buffer_append_string_buffer(b, ds->key);
			buffer_append_string_len(b, CONST_STR_LEN(": "));
			buffer_append_string_buffer(b, ds->value);
			buffer_append_string_len(b, CONST_STR_LEN("\r\n"));
		}
	}

	buffer_append_string_len(b, CONST_STR_LEN("\r\n"));

	hctx->wb->bytes_in += buffer_string_length(b);
	chunkqueue_append_buffer(hctx->wb, b);
	buffer_free(b);

	/* body */

	if (con->request.content_length) {
		chunkqueue *req_cq = con->request_content_queue;

		chunkqueue_steal(hctx->wb, req_cq, req_cq->bytes_in);
	}

	return 0;
}
开发者ID:automatical,项目名称:lighttpd1.4,代码行数:58,代码来源:mod_proxy.c


示例11: test_buffer_append_path_len

static void test_buffer_append_path_len(void) {
	buffer *b = buffer_init();

	buffer_append_path_len(b, CONST_STR_LEN("a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a")));
	buffer_clear(b);
	buffer_append_path_len(b, CONST_STR_LEN("a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a")));
	buffer_clear(b);
	buffer_append_path_len(b, CONST_STR_LEN("/a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("/"));
	buffer_append_path_len(b, CONST_STR_LEN("a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("/"));
	buffer_append_path_len(b, CONST_STR_LEN("/a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("a"));
	buffer_append_path_len(b, CONST_STR_LEN("a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("a/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("a/"));
	buffer_append_path_len(b, CONST_STR_LEN("a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("a/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("a/"));
	buffer_append_path_len(b, CONST_STR_LEN("/a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("a/a")));
	buffer_copy_string_len(b, CONST_STR_LEN("/a/"));
	buffer_append_path_len(b, CONST_STR_LEN("/a"));
	assert(buffer_is_equal_string(b, CONST_STR_LEN("/a/a")));

	buffer_free(b);
}
开发者ID:gstrauss,项目名称:lighttpd1.4,代码行数:32,代码来源:test_buffer.c


示例12: mod_accesslog_patch_connection

static int mod_accesslog_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(access_logfile);
	PATCH(format);
	PATCH(log_access_fd);
	PATCH(last_generated_accesslog_ts_ptr);
	PATCH(access_logbuffer);
	PATCH(ts_accesslog_str);
	PATCH(ts_accesslog_fmt_str);
	PATCH(append_tz_offset);
	PATCH(parsed_format);
	PATCH(use_syslog);
	PATCH(syslog_level);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("accesslog.filename"))) {
				PATCH(access_logfile);
				PATCH(log_access_fd);
				PATCH(access_logbuffer);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("accesslog.format"))) {
				PATCH(format);
				PATCH(parsed_format);
				PATCH(last_generated_accesslog_ts_ptr);
				PATCH(ts_accesslog_str);
				PATCH(ts_accesslog_fmt_str);
				PATCH(append_tz_offset);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("accesslog.use-syslog"))) {
				PATCH(use_syslog);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("accesslog.syslog-level"))) {
				PATCH(syslog_level);
			}
		}
	}

	return 0;
}
开发者ID:jonahglover,项目名称:lighttpd1.4,代码行数:49,代码来源:mod_accesslog.c


示例13: test_buffer_to_lower_upper

static void test_buffer_to_lower_upper(void) {
	buffer *psrc = buffer_init();

	buffer_copy_string_len(psrc, CONST_STR_LEN("0123456789abcdefghijklmnopqrstuvwxyz"));
	buffer_to_lower(psrc);
	assert(buffer_is_equal_string(psrc, CONST_STR_LEN("0123456789abcdefghijklmnopqrstuvwxyz")));
	buffer_to_upper(psrc);
	assert(buffer_is_equal_string(psrc, CONST_STR_LEN("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")));
	buffer_to_upper(psrc);
	assert(buffer_is_equal_string(psrc, CONST_STR_LEN("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")));
	buffer_to_lower(psrc);
	assert(buffer_is_equal_string(psrc, CONST_STR_LEN("0123456789abcdefghijklmnopqrstuvwxyz")));

	buffer_free(psrc);
}
开发者ID:gstrauss,项目名称:lighttpd1.4,代码行数:15,代码来源:test_buffer.c


示例14: mod_evasive_patch_connection

static int mod_evasive_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH_OPTION(max_conns);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("evasive.max-conns-per-ip"))) {
				PATCH_OPTION(max_conns);
			}
		}
	}

	return 0;
}
开发者ID:Fumon,项目名称:lighttpd-Basic-auth-hack,代码行数:26,代码来源:mod_evasive.c


示例15: check_base64

inline
static void check_base64 (char *out, const size_t out_sz, const char *in, const size_t in_len, const base64_charset enc) {
	force_assert(out_sz == li_to_base64_no_padding(out, out_sz, (const unsigned char *)in, in_len, enc));

	buffer_reset(check);
	force_assert(NULL != buffer_append_base64_decode(check, out, out_sz, enc));
	force_assert(buffer_is_equal_string(check, in, in_len));
}
开发者ID:gstrauss,项目名称:lighttpd1.4,代码行数:8,代码来源:test_base64.c


示例16: config_patch_connection

int config_patch_connection(server *srv, connection *con, comp_key_t comp) {
    size_t i, j;

    con->conditional_is_valid[comp] = 1;

    /* skip the first, the global context */
    for (i = 1; i < srv->config_context->used; i++) {
        data_config *dc = (data_config *)srv->config_context->data[i];
        specific_config *s = &srv->config_storage[i];

        /* not our stage */
        if (comp != dc->comp) continue;

        /* condition didn't match */
        if (!config_check_cond(srv, con, dc)) continue;

        /* merge config */
        for (j = 0; j < dc->value->used; j++) {
            data_unset *du = dc->value->data[j];

            if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.document-root"))) {
                PATCH(document_root);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.pemfile"))) {
                PATCH(ssl_pemfile);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.ca-file"))) {
                PATCH(ssl_ca_file);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.cipher-list"))) {
                PATCH(ssl_cipher_list);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.engine"))) {
                PATCH(is_ssl);
#ifdef HAVE_LSTAT
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.follow-symlink"))) {
                PATCH(follow_symlink);
#endif
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.name"))) {
                buffer_copy_string_buffer(con->server_name, s->server_name);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("connection.kbytes-per-second"))) {
                PATCH(kbytes_per_second);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.kbytes-per-second"))) {
                PATCH(global_kbytes_per_second);
                PATCH(global_bytes_per_second_cnt);
                con->conf.global_bytes_per_second_cnt_ptr = &s->global_bytes_per_second_cnt;
            }
        }
    }

    return 0;
}
开发者ID:iskey,项目名称:feng_build,代码行数:48,代码来源:configfile.c


示例17: mod_simple_vhost_patch_connection

static int mod_simple_vhost_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	PATCH(server_root);
	PATCH(default_host);
	PATCH(document_root);

	PATCH(docroot_cache_key);
	PATCH(docroot_cache_value);
	PATCH(docroot_cache_servername);

	PATCH(debug);

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("simple-vhost.server-root"))) {
				PATCH(server_root);
				PATCH(docroot_cache_key);
				PATCH(docroot_cache_value);
				PATCH(docroot_cache_servername);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("simple-vhost.default-host"))) {
				PATCH(default_host);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("simple-vhost.document-root"))) {
				PATCH(document_root);
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("simple-vhost.debug"))) {
				PATCH(debug);
			}
		}
	}

	return 0;
}
开发者ID:UIKit0,项目名称:ylem,代码行数:43,代码来源:mod_simple_vhost.c


示例18: mod_sql_vhost_core_patch_connection

static int mod_sql_vhost_core_patch_connection(server *srv, connection *con, plugin_data *p) {
    size_t i, j;
    plugin_config *s = p->config_storage[0];

    PATCH_OPTION(backend_data);
    PATCH_OPTION(get_vhost);
#ifdef HAVE_GLIB_H
    PATCH_OPTION(vhost_table);
#endif
    PATCH_OPTION(cache_ttl);
    PATCH_OPTION(debug);

    /* skip the first, the global context */
    for (i = 1; i < srv->config_context->used; i++) {
        data_config *dc = (data_config *)srv->config_context->data[i];
        s = p->config_storage[i];

        /* condition didn't match */
        if (!config_check_cond(srv, con, dc)) continue;

        if (s->backend_data) {
            PATCH_OPTION(backend_data);
            PATCH_OPTION(get_vhost);
#ifdef HAVE_GLIB_H
            PATCH_OPTION(vhost_table);
#endif
        }

        for (j = 0; j < dc->value->used; j++) {
            data_unset *du = dc->value->data[j];

            if (buffer_is_equal_string(du->key, CONST_STR_LEN(CONFIG_CACHE_TTL))) {
                PATCH_OPTION(cache_ttl);
            } else if (buffer_is_equal_string(du->key, CONST_STR_LEN(CONFIG_DEBUG))) {
                PATCH_OPTION(debug);
            }
        }
    }

    return 0;
}
开发者ID:ctdk,项目名称:lighttpd-1.5-ct,代码行数:41,代码来源:mod_sql_vhost_core.c


示例19: check_aicloud_auth_url

static int check_aicloud_auth_url(server *srv, connection *con, plugin_data *p){
	smb_info_t *c;
	int i, j, k;
	plugin_config *s;
	
	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("url.aicloud-auth-deny"))) {
				PATCH(auth_deny);
			}
		}
	}

	if(p->conf.auth_deny){
	
		for (k = 0; k < p->conf.auth_deny->used; k++) {
			data_string *ds = (data_string *)p->conf.auth_deny->data[k];
			
			if (ds->value->used == 0) continue;
			
			if (strstr(con->uri.path->ptr, ds->value->ptr)) {
				
				if(p->smb_info_list==NULL)
					return 0;
				
				for (c = p->smb_info_list; c; c = c->next) {
					if( buffer_is_empty(c->server) &&
						buffer_is_empty(c->share) &&
						buffer_is_equal(c->src_ip, con->dst_addr_buf) ){
						if(buffer_is_empty(c->username))
							return 0;
						else
							return 1;			
					}				
				}
				return 0;
			}
		}

	}
	
	return 1;
}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:53,代码来源:mod_aicloud_auth.c


示例20: mod_rewrite_patch_connection

static int mod_rewrite_patch_connection(server *srv, connection *con, plugin_data *p) {
	size_t i, j;
	plugin_config *s = p->config_storage[0];

	p->conf.rewrite = s->rewrite;
	p->conf.context = NULL;

	/* skip the first, the global context */
	for (i = 1; i < srv->config_context->used; i++) {
		data_config *dc = (data_config *)srv->config_context->data[i];
		s = p->config_storage[i];

		if (COMP_HTTP_URL == dc->comp) continue;

		/* condition didn't match */
		if (!config_check_cond(srv, con, dc)) continue;

		/* merge config */
		for (j = 0; j < dc->value->used; j++) {
			data_unset *du = dc->value->data[j];

			if (buffer_is_equal_string(du->key, CONST_STR_LEN("url.rewrite"))) {
				p->conf.rewrite = s->rewrite;
				p->conf.context = dc;
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("url.rewrite-once"))) {
				p->conf.rewrite = s->rewrite;
				p->conf.context = dc;
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("url.rewrite-repeat"))) {
				p->conf.rewrite = s->rewrite;
				p->conf.context = dc;
			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("url.rewrite-final"))) {
				p->conf.rewrite = s->rewrite;
				p->conf.context = dc;
			}
		}
	}

	return 0;
}
开发者ID:unix-socket-lwjian,项目名称:my-understanding-of-lighttpd,代码行数:39,代码来源:mod_rewrite.c



注:本文中的buffer_is_equal_string函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ buffer_jbd函数代码示例发布时间:2022-05-30
下一篇:
C++ buffer_is_empty函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap