| /lighttpd1.4/src/ |
| H A D | data_config.c | 25 ds->comp = src->comp; in data_config_copy() 28 ds->comp_key = ds->key.ptr + (src->comp_key - src->key.ptr); in data_config_copy() 39 free(ds->key.ptr); in data_config_free() 45 free(ds->string.ptr); in data_config_free() 47 if (ds->code) pcre2_code_free(ds->code); in data_config_free() 49 if (ds->match_data) pcre2_match_data_free(ds->match_data); in data_config_free() 52 if (ds->regex) pcre_free(ds->regex); in data_config_free() 53 if (ds->regex_study) pcre_free_study(ds->regex_study); in data_config_free() 65 data_config *ds = ck_calloc(1, sizeof(*ds)); in data_config_init() local 67 ds->comp_key = ""; in data_config_init() [all …]
|
| H A D | mod_setenv.c | 89 ds->ext = http_header_hkey_get(BUF_PTR_LEN(&ds->key)); in mod_setenv_prep_ext() 96 const char *s = ds->value.ptr; in mod_setenv_prep_ext() 100 s = ds->value.ptr; in mod_setenv_prep_ext() 102 if (s != ds->value.ptr) { in mod_setenv_prep_ext() 109 s = ds->value.ptr; in mod_setenv_prep_ext() 200 http_header_request_append(r, ds->ext, BUF_PTR_LEN(&ds->key), in URIHANDLER_FUNC() 209 ? http_header_request_set(r, ds->ext, BUF_PTR_LEN(&ds->key), in URIHANDLER_FUNC() 211 : http_header_request_unset(r, ds->ext, BUF_PTR_LEN(&ds->key)); in URIHANDLER_FUNC() 258 http_header_response_insert(r, ds->ext, BUF_PTR_LEN(&ds->key), in REQUEST_FUNC() 267 ? http_header_response_set(r, ds->ext, BUF_PTR_LEN(&ds->key), in REQUEST_FUNC() [all …]
|
| H A D | mod_authn_sasl.c | 107 const data_string *ds; in mod_authn_sasl_parse_opts() local 113 ds = (const data_string *) in mod_authn_sasl_parse_opts() 115 service = (NULL != ds) ? ds->value.ptr : "http"; in mod_authn_sasl_parse_opts() 117 ds = (const data_string *) in mod_authn_sasl_parse_opts() 119 if (NULL != ds) fqdn = ds->value.ptr; in mod_authn_sasl_parse_opts() 131 ds = (const data_string *) in mod_authn_sasl_parse_opts() 133 if (NULL != ds) { in mod_authn_sasl_parse_opts() 134 pwcheck_method = &ds->value; in mod_authn_sasl_parse_opts() 147 *(const buffer **)&b = &ds->value; in mod_authn_sasl_parse_opts() 156 ds = (const data_string *) in mod_authn_sasl_parse_opts() [all …]
|
| H A D | mod_vhostdb_mysql.c | 54 const data_string *ds = (data_string *)opts->data[i]; in mod_vhostdb_dbconf_setup() local 55 if (ds->type == TYPE_STRING && !buffer_is_blank(&ds->value)) { in mod_vhostdb_dbconf_setup() 56 if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("sql"))) { in mod_vhostdb_dbconf_setup() 57 sqlquery = &ds->value; in mod_vhostdb_dbconf_setup() 59 dbname = ds->value.ptr; in mod_vhostdb_dbconf_setup() 60 } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("user"))) { in mod_vhostdb_dbconf_setup() 61 user = ds->value.ptr; in mod_vhostdb_dbconf_setup() 63 pass = ds->value.ptr; in mod_vhostdb_dbconf_setup() 65 host = ds->value.ptr; in mod_vhostdb_dbconf_setup() 67 port = strtoul(ds->value.ptr, NULL, 10); in mod_vhostdb_dbconf_setup() [all …]
|
| H A D | array.c | 18 return (data_unset *)ds; in array_data_string_copy() 34 free(ds->key.ptr); in array_data_string_free() 35 free(ds->value.ptr); in array_data_string_free() 36 free(ds); in array_data_string_free() 46 data_string *ds = ck_calloc(1, sizeof(*ds)); in array_data_string_init() local 48 ds->fn = &string_fn; in array_data_string_init() 49 return ds; in array_data_string_init() 339 return ds; in array_get_unused_element() 383 if (NULL == ds) ds = array_data_string_init(); in array_insert_string_at_pos() 393 ds->ext = ext; in array_get_buf_ptr_ext() [all …]
|
| H A D | mod_vhostdb_ldap.c | 100 data_string *ds = (data_string *)opts->data[i]; in mod_vhostdb_dbconf_setup() local 101 if (ds->type == TYPE_STRING) { in mod_vhostdb_dbconf_setup() 103 filter = &ds->value; in mod_vhostdb_dbconf_setup() 105 if (!buffer_is_blank(&ds->value)) attr = ds->value.ptr; in mod_vhostdb_dbconf_setup() 107 mod_vhostdb_dbconf_add_scheme(srv, &ds->value); in mod_vhostdb_dbconf_setup() 108 host = ds->value.ptr; in mod_vhostdb_dbconf_setup() 110 if (!buffer_is_blank(&ds->value)) basedn = ds->value.ptr; in mod_vhostdb_dbconf_setup() 112 if (!buffer_is_blank(&ds->value)) binddn = ds->value.ptr; in mod_vhostdb_dbconf_setup() 114 bindpw = ds->value.ptr; in mod_vhostdb_dbconf_setup() 116 if (!buffer_is_blank(&ds->value)) cafile = ds->value.ptr; in mod_vhostdb_dbconf_setup() [all …]
|
| H A D | mod_vhostdb_pgsql.c | 52 const data_string *ds = (data_string *)opts->data[i]; in mod_vhostdb_dbconf_setup() local 53 if (ds->type == TYPE_STRING) { in mod_vhostdb_dbconf_setup() 54 if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("sql"))) { in mod_vhostdb_dbconf_setup() 55 sqlquery = &ds->value; in mod_vhostdb_dbconf_setup() 57 dbname = ds->value.ptr; in mod_vhostdb_dbconf_setup() 58 } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("user"))) { in mod_vhostdb_dbconf_setup() 59 user = ds->value.ptr; in mod_vhostdb_dbconf_setup() 61 pass = ds->value.ptr; in mod_vhostdb_dbconf_setup() 62 } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("host"))) { in mod_vhostdb_dbconf_setup() 63 host = ds->value.ptr; in mod_vhostdb_dbconf_setup() [all …]
|
| H A D | mod_proxy.c | 398 const buffer *k = &ds->key; in http_header_remap_host_match() 419 return &ds->value; in http_header_remap_host_match() 914 switch (ds->ext) { in proxy_create_env() 933 te = &ds->value; /*("trailers")*/ in proxy_create_env() 940 if (!buffer_is_blank(&ds->value)) upgrade = &ds->value; in proxy_create_env() 943 connhdr = &ds->value; in proxy_create_env() 949 const uint32_t klen = buffer_clen(&ds->key); in proxy_create_env() 955 memcpy(s+2, ds->key.ptr, klen); in proxy_create_env() 959 memcpy(s+2, ds->value.ptr, vlen); in proxy_create_env() 970 if (ds->ext == HTTP_HEADER_OTHER && buffer_eq_icase_slen(&ds->key, CONST_STR_LEN("URI"))) break; in proxy_create_env() [all …]
|
| H A D | mod_extforward.c | 225 "treating as untrusted", ds->key.ptr, ds->value.ptr); in mod_extforward_parse_forwarder() 232 ds->key.ptr, ds->value.ptr); in mod_extforward_parse_forwarder() 263 if (ds->key.ptr[0] == '[' in mod_extforward_parse_forwarder() 276 buffer_clear(&ds->value); in mod_extforward_parse_forwarder() 373 ds->ext = in SETDEFAULTS_FUNC() 413 ds->ext = http_header_hkey_get(BUF_PTR_LEN(&ds->value)); in SETDEFAULTS_FUNC() 496 const data_string *ds = in is_proxy_trusted() local 498 if (NULL != ds) return !buffer_is_blank(&ds->value); in is_proxy_trusted() 552 return &ds->value; in last_not_in_array() 1050 const data_string *ds; in URIHANDLER_FUNC() local [all …]
|
| H A D | buffer.c | 591 unsigned char *ds, *d; in buffer_append_string_encoded() local 611 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_encoded() 612 if (map[*ds & 0xFF]) { in buffer_append_string_encoded() 635 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_encoded() 655 d[d_len++] = *ds; in buffer_append_string_encoded() 661 unsigned char *ds, *d; in buffer_append_string_c_escaped() local 666 if (__builtin_expect( (*ds >= ' ' && *ds <= '~'), 1)) in buffer_append_string_c_escaped() 669 switch (*ds) { in buffer_append_string_c_escaped() 690 if (__builtin_expect( (*ds >= ' ' && *ds <= '~'), 1)) in buffer_append_string_c_escaped() 691 d[d_len++] = *ds; in buffer_append_string_c_escaped() [all …]
|
| H A D | http_cgi.c | 315 data_string *ds = (data_string *)r->rqst_headers.data[n]; in http_cgi_headers() local 316 if (!buffer_is_blank(&ds->value) && !buffer_is_unset(&ds->key)) { in http_cgi_headers() 320 if (ds->ext == HTTP_HEADER_OTHER in http_cgi_headers() 321 && buffer_eq_icase_slen(&ds->key, CONST_STR_LEN("Proxy"))) { in http_cgi_headers() 324 else if (ds->ext == HTTP_HEADER_CONTENT_TYPE) in http_cgi_headers() 327 http_cgi_encode_varname(tb, BUF_PTR_LEN(&ds->key), 1); in http_cgi_headers() 329 BUF_PTR_LEN(&ds->value)); in http_cgi_headers() 336 data_string *ds = (data_string *)r->env.data[n]; in http_cgi_headers() local 337 if (!buffer_is_unset(&ds->value) && !buffer_is_unset(&ds->key)) { in http_cgi_headers() 338 http_cgi_encode_varname(tb, BUF_PTR_LEN(&ds->key), 0); in http_cgi_headers() [all …]
|
| H A D | mod_expire.c | 206 size_t klen = buffer_clen(&ds->key); in SETDEFAULTS_FUNC() 207 if (klen && ds->key.ptr[klen-1] == '*') in SETDEFAULTS_FUNC() 208 buffer_truncate(&ds->key, klen-1); in SETDEFAULTS_FUNC() 306 const data_string *ds; in REQUEST_FUNC() local 321 ds = p->conf.expire_url in REQUEST_FUNC() 325 if (NULL == ds) { in REQUEST_FUNC() 329 ds = (const data_string *) in REQUEST_FUNC() 331 if (NULL == ds) { in REQUEST_FUNC() 332 ds = (const data_string *) in REQUEST_FUNC() 335 if (NULL == ds) return HANDLER_GO_ON; in REQUEST_FUNC() [all …]
|
| H A D | mod_vhostdb_dbi.c | 81 const data_string *ds = (data_string *)opts->data[i]; in mod_vhostdb_dbconf_setup() local 82 if (ds->type == TYPE_STRING) { in mod_vhostdb_dbconf_setup() 83 if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("sql"))) { in mod_vhostdb_dbconf_setup() 84 sqlquery = &ds->value; in mod_vhostdb_dbconf_setup() 85 } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("dbname"))) { in mod_vhostdb_dbconf_setup() 86 dbname = &ds->value; in mod_vhostdb_dbconf_setup() 87 } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("dbtype"))) { in mod_vhostdb_dbconf_setup() 88 dbtype = &ds->value; in mod_vhostdb_dbconf_setup() 136 data_string *ds = (data_string *)du; in mod_vhostdb_dbconf_setup() local 137 if (&ds->value != sqlquery && &ds->value != dbtype) { in mod_vhostdb_dbconf_setup() [all …]
|
| H A D | mod_authn_dbi.c | 111 const data_string *ds = (data_string *)opts->data[i]; in mod_authn_dbi_dbconf_setup() local 112 if (ds->type == TYPE_STRING) { in mod_authn_dbi_dbconf_setup() 113 if (buffer_eq_icase_slen(&ds->key, CONST_STR_LEN("sql"))) in mod_authn_dbi_dbconf_setup() 114 sqlquery = &ds->value; in mod_authn_dbi_dbconf_setup() 116 dbname = &ds->value; in mod_authn_dbi_dbconf_setup() 118 dbtype = &ds->value; in mod_authn_dbi_dbconf_setup() 119 else if (buffer_eq_icase_slen(&ds->key, in mod_authn_dbi_dbconf_setup() 121 sqluserhash = &ds->value; in mod_authn_dbi_dbconf_setup() 169 data_string *ds = (data_string *)du; in mod_authn_dbi_dbconf_setup() local 170 if (&ds->value != sqlquery && &ds->value != dbtype in mod_authn_dbi_dbconf_setup() [all …]
|
| H A D | mod_alias.c | 132 data_string * const ds = (data_string *) in mod_alias_remap() local 136 if (NULL == ds) return HANDLER_GO_ON; in mod_alias_remap() 140 const uint32_t alias_len = buffer_clen(&ds->key); in mod_alias_remap() 141 const uint32_t vlen = buffer_clen(&ds->value); in mod_alias_remap() 149 if (0 != alias_len && ds->key.ptr[alias_len-1] != '/' in mod_alias_remap() 150 && 0 != vlen && ds->value.ptr[vlen-1] == '/') { in mod_alias_remap() 170 memcpy(r->physical.path.ptr, ds->value.ptr, vlen); in mod_alias_remap() 172 buffer_copy_string_len(&r->physical.basedir, ds->value.ptr, vlen); in mod_alias_remap()
|
| H A D | mod_redirect.c | 85 data_string *ds = (data_string *)a->data[j]; in mod_redirect_parse_list() local 87 pcre_keyvalue_burl_normalize_key(&ds->key, tb); in mod_redirect_parse_list() 88 pcre_keyvalue_burl_normalize_value(&ds->value, tb); in mod_redirect_parse_list() 90 for (const char *s = ds->value.ptr; (s = strchr(s, '%')); ++s) { in mod_redirect_parse_list() 98 if (!pcre_keyvalue_buffer_append(srv->errh, kvb, &ds->key, &ds->value, in mod_redirect_parse_list() 101 "pcre-compile failed for %s", ds->key.ptr); in mod_redirect_parse_list()
|
| H A D | mod_evhost.c | 283 const data_string *ds; in mod_evhost_build_doc_root_path() local 301 if (NULL != (ds = (data_string *)array_get_element_klen(parsed_host, s, 2))) { in mod_evhost_build_doc_root_path() 303 buffer_append_string_buffer(b, &ds->value); in mod_evhost_build_doc_root_path() 305 if ((size_t)(ptr[4]-'0') <= buffer_clen(&ds->value)) { in mod_evhost_build_doc_root_path() 306 buffer_append_char(b, ds->value.ptr[(ptr[4]-'0')-1]); in mod_evhost_build_doc_root_path() 312 …} else if (NULL != (ds = (data_string *)array_get_element_klen(parsed_host, BUF_PTR_LEN(path_piece… in mod_evhost_build_doc_root_path() 313 buffer_append_string_buffer(b, &ds->value); in mod_evhost_build_doc_root_path()
|
| H A D | http_header.c | 213 data_string * const ds = in http_header_generic_get_ifnotempty() local 215 return ds && !buffer_is_blank(&ds->value) ? &ds->value : NULL; in http_header_generic_get_ifnotempty() 339 data_string * const ds = in http_header_env_get() local 341 return ds && !buffer_is_blank(&ds->value) ? &ds->value : NULL; in http_header_env_get()
|
| H A D | response.c | 43 http_response_omit_header (request_st * const r, const data_string * const ds) in http_response_omit_header() argument 45 const size_t klen = buffer_clen(&ds->key); in http_response_omit_header() 47 && buffer_eq_icase_ssn(ds->key.ptr, CONST_STR_LEN("X-Sendfile"))) in http_response_omit_header() 50 && buffer_eq_icase_ssn(ds->key.ptr, CONST_STR_LEN("X-LIGHTTPD-"))) { in http_response_omit_header() 52 && buffer_eq_icase_ssn(ds->key.ptr+sizeof("X-LIGHTTPD-")-1, in http_response_omit_header() 139 const data_string * const ds = (data_string *)r->resp_headers.data[i]; in http_response_write_header() local 140 const uint32_t klen = buffer_clen(&ds->key); in http_response_write_header() 141 const uint32_t vlen = buffer_clen(&ds->value); in http_response_write_header() 144 if ((ds->key.ptr[0] & 0xdf) == 'X' && http_response_omit_header(r, ds)) in http_response_write_header() 149 memcpy(s+2, ds->key.ptr, klen); in http_response_write_header() [all …]
|
| H A D | mod_rewrite.c | 108 data_string *ds = (data_string *)a->data[j]; in mod_rewrite_parse_list() local 110 pcre_keyvalue_burl_normalize_key(&ds->key, tb); in mod_rewrite_parse_list() 111 pcre_keyvalue_burl_normalize_value(&ds->value, tb); in mod_rewrite_parse_list() 113 for (const char *s = ds->value.ptr; (s = strchr(s, '%')); ++s) { in mod_rewrite_parse_list() 121 if (!pcre_keyvalue_buffer_append(srv->errh, kvb, &ds->key, &ds->value, in mod_rewrite_parse_list() 124 "pcre-compile failed for %s", ds->key.ptr); in mod_rewrite_parse_list()
|
| H A D | stat_cache.c | 958 const data_string *ds = (data_string *)mimetypes->data[i]; in stat_cache_mimetype_by_ext() local 959 const size_t klen = buffer_clen(&ds->key); in stat_cache_mimetype_by_ext() 960 if (klen <= nlen && buffer_eq_icase_ssn(end-klen, ds->key.ptr, klen)) in stat_cache_mimetype_by_ext() 961 return &ds->value; in stat_cache_mimetype_by_ext() 966 const data_string *ds; in stat_cache_mimetype_by_ext() local 975 ds = (const data_string *)array_get_element_klen(mimetypes, s, end - s); in stat_cache_mimetype_by_ext() 976 if (NULL != ds) return &ds->value; in stat_cache_mimetype_by_ext() 981 ds = (const data_string *)array_get_element_klen(mimetypes, s, end - s); in stat_cache_mimetype_by_ext() 982 if (NULL != ds) return &ds->value; in stat_cache_mimetype_by_ext() 988 if (NULL != ds) return &ds->value; in stat_cache_mimetype_by_ext() [all …]
|
| H A D | mod_openssl.c | 1955 const data_string *ds; in network_openssl_ssl_conf_cmd() local 1964 ds = (const data_string *) in network_openssl_ssl_conf_cmd() 1967 if (NULL != ds) { in network_openssl_ssl_conf_cmd() 1988 if (SSL_CONF_cmd(cctx, ds->key.ptr, ds->value.ptr) <= 0) { in network_openssl_ssl_conf_cmd() 1990 "SSL: SSL_CONF_cmd %s %s: %s", ds->key.ptr, ds->value.ptr, in network_openssl_ssl_conf_cmd() 3768 cipherstring = &ds->value; in mod_openssl_ssl_conf_cmd() 3773 curves = &ds->value; in mod_openssl_ssl_conf_cmd() 3781 maxb = &ds->value; in mod_openssl_ssl_conf_cmd() 3783 minb = &ds->value; in mod_openssl_ssl_conf_cmd() 3789 ds->key.ptr); in mod_openssl_ssl_conf_cmd() [all …]
|
| H A D | configparser.y | 99 data_string *ds = (data_string *)op1; in configparser_merge_data() local 100 buffer_append_int(&ds->value, ((data_integer*)op2)->value); in configparser_merge_data() 103 data_string *ds = array_data_string_init(); in configparser_merge_data() local 104 buffer_append_int(&ds->value, ((data_integer*)op1)->value); in configparser_merge_data() 105 buffer_append_string_buffer(&ds->value, &((data_string*)op2)->value); in configparser_merge_data() 107 return (data_unset *)ds; in configparser_merge_data() 514 data_string *ds; in value() local 515 ds = array_data_string_init(); in value() 516 buffer_append_string(&ds->value, env); in value() 517 A = (data_unset *)ds; in value()
|
| H A D | mod_userdir.c | 159 const data_string * const ds = (const data_string *)a->data[i]; in mod_userdir_in_vlist_nc() local 160 if (buffer_eq_icase_slen(&ds->value, k, klen)) return 1; in mod_userdir_in_vlist_nc() 167 const data_string * const ds = (const data_string *)a->data[i]; in mod_userdir_in_vlist() local 168 if (buffer_eq_slen(&ds->value, k, klen)) return 1; in mod_userdir_in_vlist()
|
| /lighttpd1.4/src/t/ |
| H A D | test_array.c | 32 data_string *ds; in test_array_insert_value() local 36 ds = (data_string *)a->data[0]; in test_array_insert_value() 37 assert(NULL != ds); in test_array_insert_value() 38 assert(buffer_eq_slen(&ds->value, CONST_STR_LEN("def"))); in test_array_insert_value() 44 data_string *ds; in test_array_set_key_value() local 49 assert(NULL == ds); in test_array_set_key_value() 51 assert(NULL != ds); in test_array_set_key_value() 52 assert(buffer_eq_slen(&ds->key, CONST_STR_LEN("abc"))); in test_array_set_key_value() 57 assert(NULL == ds); in test_array_set_key_value() 59 assert(NULL != ds); in test_array_set_key_value() [all …]
|