| /lighttpd1.4/src/ |
| H A D | http_header.c | 214 (data_string *)array_get_element_klen_ext(a, id, k, klen); in http_header_generic_get_ifnotempty() 219 buffer_copy_string_len(array_get_buf_ptr_ext(a, id, k, klen), v, vlen); in http_header_set_key_value() 225 ? http_header_generic_get_ifnotempty(&r->resp_headers, id, k, klen) in http_header_response_get() 256 http_header_set_key_value(&r->resp_headers, id, k, klen, v, vlen); in http_header_response_set() 285 http_header_response_insert_addtl(r, id, k, klen, vb, vlen); in http_header_response_insert() 292 ? http_header_generic_get_ifnotempty(&r->rqst_headers, id, k, klen) in http_header_request_get() 323 http_header_set_key_value(&r->rqst_headers, id, k, klen, v, vlen); in http_header_request_set() 340 (data_string *)array_get_element_klen(&r->env, k, klen); in http_header_env_get() 345 buffer * const vb = array_get_buf_ptr(&r->env, k, klen); in http_header_env_set_ptr() 351 array_set_key_value(&r->env, k, klen, v, vlen); in http_header_env_set() [all …]
|
| H A D | http_header.h | 116 buffer * http_header_response_get(const request_st *r, enum http_header_e id, const char *k, uint32… 118 buffer * http_header_response_set_ptr(request_st *r, enum http_header_e id, const char *k, uint32_t… 119 void http_header_response_unset(request_st *r, enum http_header_e id, const char *k, uint32_t klen); 125 buffer * http_header_request_get(const request_st *r, enum http_header_e id, const char *k, uint32_… 127 buffer * http_header_request_set_ptr(request_st *r, enum http_header_e id, const char *k, uint32_t … 128 void http_header_request_unset(request_st *r, enum http_header_e id, const char *k, uint32_t klen); 129 void http_header_request_set(request_st *r, enum http_header_e id, const char *k, uint32_t klen, co… 133 buffer * http_header_env_get(const request_st *r, const char *k, uint32_t klen); 135 buffer * http_header_env_set_ptr(request_st *r, const char *k, uint32_t klen); 136 void http_header_env_set(request_st *r, const char *k, uint32_t klen, const char *v, uint32_t vlen); [all …]
|
| H A D | mod_setenv.c | 198 for (uint32_t k = 0; k < aa->used; ++k) { in URIHANDLER_FUNC() local 199 const data_string * const ds = (const data_string *)aa->data[k]; in URIHANDLER_FUNC() 206 for (uint32_t k = 0; k < as->used; ++k) { in URIHANDLER_FUNC() local 207 const data_string * const ds = (const data_string *)as->data[k]; in URIHANDLER_FUNC() 229 for (uint32_t k = 0; k < hctx->conf.environment->used; ++k) { in REQUEST_FUNC() local 230 const data_string * const ds = (const data_string *)aa->data[k]; in REQUEST_FUNC() 237 for (uint32_t k = 0; k < as->used; ++k) { in REQUEST_FUNC() local 238 const data_string * const ds = (const data_string *)as->data[k]; in REQUEST_FUNC() 256 for (uint32_t k = 0; k < aa->used; ++k) { in REQUEST_FUNC() local 257 const data_string * const ds = (const data_string *)aa->data[k]; in REQUEST_FUNC() [all …]
|
| H A D | mod_magnet.c | 495 switch (k.len ? k.ptr[0] : 0) { in magnet_stat_field() 1632 : http_header_request_unset(r, id, k.ptr, k.len); in magnet_reqhdr_set() 1677 http_header_response_unset(r, id, k.ptr, k.len); in magnet_resphdr_set_kv() 2282 if (k[1] == 'd' && k[2] == 'd' && k[3] == '\0') { in magnet_respbody() 2303 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_respbody() 2317 if (k[1] == 'e' && k[2] == 'n' && k[3] == '\0') { in magnet_respbody() 2326 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_respbody() 2393 if (k[1] == 'd' && k[2] == 'd' && k[3] == '\0') { in magnet_reqbody() 2441 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_reqbody() 2454 if (k[1] == 'e' && k[2] == 'n' && k[3] == '\0') { in magnet_reqbody() [all …]
|
| H A D | request.c | 637 const char * const restrict k = hpctx->k; in http_request_parse_header() local 660 if (*k == ':') { in http_request_parse_header() 798 while (j < klen && (light_islower(k[j]) || k[j] == '-')) in http_request_parse_header() 823 if (*k == ':') in http_request_parse_header() 1063 if (light_isalpha(k[i]) || k[i] == '-') continue; /*(common cases)*/ in http_request_parse_header_other() 1069 switch(k[i]) { in http_request_parse_header_other() 1094 if (http_header_strict ? (k[i] < 32 || ((unsigned char *)k)[i] >= 127) : k[i] == '\0') in http_request_parse_header_other() 1114 const char *k = ptr + hoff[i]; in http_request_parse_headers() local 1118 const char *colon = memchr(k, ':', end - k); in http_request_parse_headers() 1155 if (light_isalpha(k[j]) || k[j] == '-') continue; /*(common cases)*/ in http_request_parse_headers() [all …]
|
| H A D | mod_maxminddb.c | 149 for (uint32_t k = 0, cused = env->used; k < cused; ++k) in FREE_FUNC() local 150 free(cenv[k]); in FREE_FUNC() 201 for (uint32_t k = 0; k < j; ++k) free(cenv[k]); in mod_maxminddb_prep_cenv() local 212 for (uint32_t k = 0; k < j; ++k) free(cenv[k]); in mod_maxminddb_prep_cenv() local 217 unsigned int k = 2; in mod_maxminddb_prep_cenv() local 218 for (char *t = value->ptr; (t = strchr(t, '/')); ++t) ++k; in mod_maxminddb_prep_cenv() 220 (const char **)(cenv[j] = ck_calloc(k, sizeof(char *))); in mod_maxminddb_prep_cenv() 221 k = 0; in mod_maxminddb_prep_cenv() 222 keys[k] = value->ptr; in mod_maxminddb_prep_cenv() 225 keys[++k] = ++t; in mod_maxminddb_prep_cenv() [all …]
|
| H A D | keyvalue.c | 368 for (size_t k = 0; k + 1 < pattern_len; ++k) { in pcre_keyvalue_buffer_subst() local 369 if (pattern[k] == '$' || pattern[k] == '%') { in pcre_keyvalue_buffer_subst() 373 if (pattern[k + 1] == '{') { in pcre_keyvalue_buffer_subst() 376 k += (size_t)num; in pcre_keyvalue_buffer_subst() 379 unsigned int num = (unsigned int)pattern[k + 1] - '0'; in pcre_keyvalue_buffer_subst() 380 pattern[k] == '$' /*(else '%')*/ in pcre_keyvalue_buffer_subst() 386 buffer_append_string_len(b, pattern+k, pattern[k] == pattern[k+1] ? 1 : 2); in pcre_keyvalue_buffer_subst() 389 k++; in pcre_keyvalue_buffer_subst() 390 start = k + 1; in pcre_keyvalue_buffer_subst() 556 pcre_keyvalue_burl_percent_toupper(k); in pcre_keyvalue_burl_normalize_key() [all …]
|
| H A D | configfile-glue.c | 115 array_get_element_klen(ca, cpk[i].k, cpk[i].klen); in config_plugin_values_init_block() 133 "%s = ( \"...\" )", cpk[i].k, cpk[i].k); in config_plugin_values_init_block() 143 cpk[i].k, cpk[i].k); in config_plugin_values_init_block() 153 cpk[i].k, cpk[i].k); in config_plugin_values_init_block() 163 cpk[i].k, cpk[i].k); in config_plugin_values_init_block() 173 cpk[i].k, cpk[i].k); in config_plugin_values_init_block() 224 "range 0 ... 65535", cpk[i].k, du->type); in config_plugin_values_init_block() 252 "range 0 ... 4294967295", cpk[i].k, du->type); in config_plugin_values_init_block() 263 "\"(enable|disable)\"", cpk[i].k); in config_plugin_values_init_block() 330 "variable: %s", cpk[i].k); in config_plugin_values_init() [all …]
|
| H A D | mod_expire.c | 200 for (uint32_t k = 0; k < cpv->v.a->used; ++k) { in SETDEFAULTS_FUNC() local 201 data_string *ds = (data_string *)cpv->v.a->data[k]; in SETDEFAULTS_FUNC() 233 for (uint32_t k = 0; k < a->used; ++k, toff+=2, p->tused+=2) { in SETDEFAULTS_FUNC() local 234 buffer *v = &((data_string *)a->data[k])->value; in SETDEFAULTS_FUNC() 238 "parsing %s failed: %s", cpk[cpv->k_id].k, v->ptr); in SETDEFAULTS_FUNC()
|
| H A D | array.h | 110 int * array_get_int_ptr(array *a, const char *k, uint32_t klen); 113 buffer * array_get_buf_ptr_ext(array *a, int ext, const char *k, uint32_t klen); 116 buffer * array_get_buf_ptr(array *a, const char *k, uint32_t klen); 120 static inline void array_set_key_value(array * const a, const char * const k, const uint32_t klen, … 122 static inline void array_set_key_value(array * const a, const char * const k, const uint32_t klen, … in array_set_key_value() argument 123 buffer_copy_string_len(array_get_buf_ptr(a, k, klen), v, vlen); in array_set_key_value()
|
| H A D | fdevent_impl.c | 732 int k = fdn->fde_ndx; in fdevent_poll_event_del() local 733 if ((uint32_t)k >= ev->used || ev->pollfds[k].fd != fd) in fdevent_poll_event_del() 736 ev->pollfds[k].fd = -1; in fdevent_poll_event_del() 755 int k = fdn->fde_ndx; in fdevent_poll_event_set() local 761 if (k >= 0) { in fdevent_poll_event_set() 762 if ((uint32_t)k >= ev->used || ev->pollfds[k].fd != fd) in fdevent_poll_event_set() 764 ev->pollfds[k].events = events; in fdevent_poll_event_set() 778 k = ev->used++; in fdevent_poll_event_set() 781 fdn->fde_ndx = k; in fdevent_poll_event_set() 782 ev->pollfds[k].fd = fd; in fdevent_poll_event_set() [all …]
|
| H A D | array.c | 215 return array_keycmp(k, klen, b->ptr, b->used-1); in array_keycmpb() 236 : array_keycmpb(k, klen, &a->sorted[probe]->key); in array_get_index_ext() 270 int cmp = array_keycmp(k, klen, b->ptr, b->used-1); in array_get_index() 389 int32_t ipos = array_get_index_ext(a, ext, k, klen); in array_get_buf_ptr_ext() 394 buffer_copy_string_len(&ds->key, k, klen); in array_get_buf_ptr_ext() 399 int * array_get_int_ptr(array * const a, const char * const k, const uint32_t klen) { in array_get_int_ptr() argument 400 int32_t ipos = array_get_index(a, k, klen); in array_get_int_ptr() 404 buffer_copy_string_len(&di->key, k, klen); in array_get_int_ptr() 409 buffer * array_get_buf_ptr(array * const a, const char * const k, const uint32_t klen) { in array_get_buf_ptr() argument 410 int32_t ipos = array_get_index(a, k, klen); in array_get_buf_ptr() [all …]
|
| H A D | mod_alias.c | 56 for (uint32_t k = j + 1; k < a->used; ++k) { in mod_alias_check_order() local 57 const buffer * const key = &a->data[k]->key; in mod_alias_check_order() 66 const data_unset *dk = a->data[k]; in mod_alias_check_order()
|
| H A D | mod_indexfile.c | 83 for (uint32_t k = 0; k < indexfiles->used; ++k) { in __attribute_nonnull__() local 84 const buffer * const v = &((data_string *)indexfiles->data[k])->value; in __attribute_nonnull__()
|
| H A D | response.c | 718 const char *k = strchr(r->gw_dechunk->b.ptr, '\n'); /*(skip final chunk)*/ in http_response_merge_trailers() local 719 if (NULL == k) return; /*(should not happen)*/ in http_response_merge_trailers() 720 ++k; in http_response_merge_trailers() 721 for (const char *v, *e; (e = strchr(k, '\n')); k = e+1) { in http_response_merge_trailers() 722 v = memchr(k, ':', (size_t)(e - k)); in http_response_merge_trailers() 723 if (NULL == v || v == k || *k == ' ' || *k == '\t') continue; in http_response_merge_trailers() 724 uint32_t klen = (uint32_t)(v - k); in http_response_merge_trailers() 727 enum http_header_e id = http_header_hkey_get(k, klen); in http_response_merge_trailers() 728 http_header_response_insert(r, id, k, klen, v, (size_t)(e - v)); in http_response_merge_trailers()
|
| H A D | gw_backend.c | 829 for (int k = 0; k < ext_used; ++k) { in gw_host_get() local 843 ndx = k; in gw_host_get() 851 for (int k = 0, max_usage = INT_MAX; k < ext_used; ++k) { in gw_host_get() local 856 ndx = k; in gw_host_get() 898 for (int k = 0; k < ext_used; ++k) { in gw_host_get() local 912 ndx = k; in gw_host_get() 943 for (int k = 0; k < ext_used; ++k) { in gw_host_get() local 1463 for (uint32_t k = 0; k < cpv->v.a->used; ++k) { in gw_set_defaults_backend() local 2516 uint32_t k; in gw_check_extension() local 2517 for (k = 0; k < exts->used; ++k) { in gw_check_extension() [all …]
|
| H A D | mod_extforward.c | 721 int i = 0, j = -1, v, vlen, k, klen; in mod_extforward_Forwarded() local 736 k = i; in mod_extforward_Forwarded() 744 klen = i - k; in mod_extforward_Forwarded() 760 offsets[j+1] = k; in mod_extforward_Forwarded() 1086 for (uint32_t k = 0; k < p->conf.headers->used; ++k) { in URIHANDLER_FUNC() local 1587 const char *k; in mod_extforward_hap_PROXY_v2() local 1616 k = "SSL_PROTOCOL"; in mod_extforward_hap_PROXY_v2() 1627 k = "SSL_CIPHER"; in mod_extforward_hap_PROXY_v2() 1631 k = "SSL_SERVER_A_SIG"; in mod_extforward_hap_PROXY_v2() 1635 k = "SSL_SERVER_A_KEY"; in mod_extforward_hap_PROXY_v2() [all …]
|
| H A D | configfile.c | 559 buffer *k = &config->value->data[j]->key; in config_deprecate_module_compress() local 599 const buffer *k = &ds->key; in config_http_parseopts() local 608 if (buffer_eq_slen(k, CONST_STR_LEN("url-normalize"))) in config_http_parseopts() 614 else if (buffer_eq_slen(k, CONST_STR_LEN("url-ctrls-reject"))) in config_http_parseopts() 630 else if (buffer_eq_slen(k, CONST_STR_LEN("header-strict"))) { in config_http_parseopts() 634 else if (buffer_eq_slen(k, CONST_STR_LEN("host-strict"))) { in config_http_parseopts() 638 else if (buffer_eq_slen(k, CONST_STR_LEN("host-normalize"))) { in config_http_parseopts() 1277 const buffer * const k = &config->data[j]->key; in config_finalize() local 1280 if (strncmp(k->ptr, "var.", sizeof("var.") - 1) == 0) in config_finalize() 1284 && strcmp(k->ptr, "dir-listing.activate") != 0) in config_finalize() [all …]
|
| H A D | lemon.c | 95 int i, j, k, c; in lemon_vsprintf() local 119 k = 0; in lemon_vsprintf() 121 k++; in lemon_vsprintf() 719 if( k<0 || k>=p->nAction ) break; in acttab_insert() 776 if( k>=p->nAction ) p->nAction = k+1; in acttab_insert() 1429 for(k=0; k<xsp->nsubsym; k++){ in Configlist_closure() 2821 int k; in eval_preprocessor_boolean() local 2824 for(k=i+1; z[k]; k++){ in eval_preprocessor_boolean() 2855 for(k=i+1; ISALNUM(z[k]) || z[k]=='_'; k++){} in eval_preprocessor_boolean() 4279 for(k=1; k<sp->nsubsym; k++){ in writeRuleText() [all …]
|
| H A D | mod_userdir.c | 157 static int mod_userdir_in_vlist_nc(const array * const a, const char * const k, const size_t klen) { in mod_userdir_in_vlist_nc() argument 160 if (buffer_eq_icase_slen(&ds->value, k, klen)) return 1; in mod_userdir_in_vlist_nc() 165 static int mod_userdir_in_vlist(const array * const a, const char * const k, const size_t klen) { in mod_userdir_in_vlist() argument 168 if (buffer_eq_slen(&ds->value, k, klen)) return 1; in mod_userdir_in_vlist()
|
| H A D | http-header-glue.c | 889 const char *k = s+hoff[i], *value; in http_response_process_headers() local 893 if (NULL == (value = memchr(k, ':', end - k))) { in http_response_process_headers() 898 const uint32_t klen = (uint32_t)(value - k); in http_response_process_headers() 900 const enum http_header_e id = http_header_hkey_get(k, klen); in http_response_process_headers() 923 else if (id == HTTP_HEADER_OTHER && klen > 9 && (k[0] & 0xdf) == 'V' in http_response_process_headers() 924 && buffer_eq_icase_ssn(k, CONST_STR_LEN("Variable-"))) { in http_response_process_headers() 925 http_header_env_append(r, k + 9, klen - 9, value, end - value); in http_response_process_headers() 1020 if (k[klen-1] == ' ' || k[klen-1] == '\t') in http_response_process_headers() 1028 http_header_response_insert(r, id, k, klen, value, end - value); in http_response_process_headers()
|
| H A D | mod_auth_api.c | 85 static int http_auth_array_contains (const array * const a, const char * const k, const size_t klen) in http_auth_array_contains() argument 88 if (buffer_eq_slen(&((data_string *)a->data[i])->value, k, klen)) in http_auth_array_contains()
|
| H A D | h2.c | 1422 hpctx.k = lsx.buf+lsx.name_offset; in h2_parse_headers_frame() 2228 v[j] = !light_isupper(k[j]) ? k[j] : (k[j] | 0x20); in h2_send_headers() 2398 const char *v = memchr(k, ':', end-k); in h2_send_headers_block() 2402 if (NULL == v || k == v) continue; in h2_send_headers_block() 2403 uint32_t klen = v - k; in h2_send_headers_block() 2408 force_assert(end >= k + 2); in h2_send_headers_block() 2417 lsx.name_offset = k - hdrs; in h2_send_headers_block() 2510 if (*k == ':') { in h2_send_end_stream_trailers() 2515 const char * const colon = memchr(k, ':', ptr+hoff[i+1]-k); in h2_send_end_stream_trailers() 2518 if (light_isupper(*k)) *k |= 0x20; in h2_send_end_stream_trailers() [all …]
|
| H A D | mod_status.c | 137 static void mod_status_header_append_sort(buffer *b, plugin_data *p, const char* k, size_t klen) in mod_status_header_append_sort() argument 142 k, klen, in mod_status_header_append_sort() 146 k, klen, in mod_status_header_append_sort() 697 static void mod_status_row_append(buffer *b, const char *k, size_t klen, const char *v, size_t vlen) in mod_status_row_append() argument 702 ,{ k, klen } in mod_status_row_append() 712 static void mod_status_header_append(buffer *b, const char *k, size_t klen) in mod_status_header_append() argument 717 k, klen, in mod_status_header_append()
|
| /lighttpd1.4/tests/ |
| H A D | LightyTest.pm | 412 (my $k = $_) =~ tr/[A-Z]/[a-z]/; 417 if (substr($k, 0, 1) eq '+') { 418 $k = substr($k, 1); 420 } elsif (substr($k, 0, 1) eq '-') { 422 $k = substr($k, 1); 428 if (defined $resp_hdr{$k}) { 433 if (not defined $resp_hdr{$k}) { 441 if ($resp_hdr{$k} !~ /$1/) { 444 $href->{$_}, $resp_hdr{$k}, $1)); 447 } elsif ($href->{$_} ne $resp_hdr{$k}) { [all …]
|