| /lighttpd1.4/src/ |
| H A D | mod_authn_file.c | 407 mod_authn_file_digest(ai, BUF_PTR_LEN(tb)); in mod_authn_file_plain_digest() 408 size_t tblen = (buffer_clen(tb) + 63) & ~63u; in mod_authn_file_plain_digest() 409 buffer_clear(tb); in mod_authn_file_plain_digest() 410 ck_memzero(tb->ptr, tblen < tb->size ? tblen : tb->size); in mod_authn_file_plain_digest() 423 size_t tblen = (buffer_clen(tb) + 63) & ~63u; in mod_authn_file_plain_basic() 424 buffer_clear(tb); in mod_authn_file_plain_basic() 425 ck_memzero(tb->ptr, tblen < tb->size ? tblen : tb->size); in mod_authn_file_plain_basic() 703 uint32_t tblen = buffer_clen(tb); in mod_authn_file_htpasswd_basic() 728 rc = mod_authn_file_crypt_cmp(tb, pw); in mod_authn_file_htpasswd_basic() 732 buffer_clear(tb); in mod_authn_file_htpasswd_basic() [all …]
|
| H A D | http_range.c | 211 buffer * const tb = r->tmp_buf; in http_range_multi() local 212 buffer_copy_string_len(tb, CONST_STR_LEN(boundary_prefix)); in http_range_multi() 221 const uint32_t prefix_len = buffer_clen(tb); in http_range_multi() 247 buffer_truncate(tb, prefix_len); in http_range_multi() 248 buffer_append_int(tb, ranges[i]); in http_range_multi() 249 buffer_append_char(tb, '-'); in http_range_multi() 250 buffer_append_int(tb, ranges[i+1]); in http_range_multi() 251 buffer_append_char(tb, '/'); in http_range_multi() 252 buffer_append_int(tb, complete_length); in http_range_multi() 255 chunkqueue_append_mem(cq, BUF_PTR_LEN(tb)); in http_range_multi() [all …]
|
| H A D | mod_ssi.c | 647 buffer *tb = NULL; in process_ssi_stmt() local 766 tb = r->tmp_buf; in process_ssi_stmt() 767 buffer_clear(tb); in process_ssi_stmt() 784 tb = r->tmp_buf; in process_ssi_stmt() 785 buffer_clear(tb); in process_ssi_stmt() 876 tb = r->tmp_buf; in process_ssi_stmt() 897 buffer_clear(tb); in process_ssi_stmt() 935 sep2 = tb->ptr; in process_ssi_stmt() 971 buffer_clear(tb); in process_ssi_stmt() 1110 tb = r->tmp_buf; in process_ssi_stmt() [all …]
|
| H A D | plugin.c | 165 buffer * const tb = srv->tmp_buf; in plugins_load() local 173 buffer_clear(tb); in plugins_load() 174 buffer_append_str2(tb, BUF_PTR_LEN(module), in plugins_load() 178 GetProcAddress(GetModuleHandle(NULL), tb->ptr); in plugins_load() 184 buffer_copy_string(tb, srv->srvconf.modules_dir); in plugins_load() 185 buffer_append_path_len(tb, BUF_PTR_LEN(module)); in plugins_load() 189 if (NULL == (lib = LoadLibrary(tb->ptr))) { in plugins_load() 191 "LoadLibrary()", tb->ptr); in plugins_load() 198 buffer_copy_buffer(tb, module); in plugins_load() 222 buffer_clear(tb); in plugins_load() [all …]
|
| H A D | http_cgi.c | 128 buffer * const tb = r->tmp_buf; in http_cgi_headers() local 182 buffer_copy_path_len2(tb, BUF_PTR_LEN(bd), in http_cgi_headers() 185 BUF_PTR_LEN(tb)); in http_cgi_headers() 198 buffer_copy_path_len2(tb, BUF_PTR_LEN(opts->docroot), in http_cgi_headers() 201 BUF_PTR_LEN(tb)); in http_cgi_headers() 212 buffer_copy_path_len2(tb, BUF_PTR_LEN(&r->physical.path), in http_cgi_headers() 215 BUF_PTR_LEN(tb)); in http_cgi_headers() 327 http_cgi_encode_varname(tb, BUF_PTR_LEN(&ds->key), 1); in http_cgi_headers() 328 rc |= cb(vdata, BUF_PTR_LEN(tb), 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_dirlisting.c | 618 : tb; in http_list_directory_include_file() 625 if (out == tb) { in http_list_directory_include_file() 633 if (out != tb) in http_list_directory_include_file() 1151 buffer * const tb = r->tmp_buf; in http_list_directory() local 1152 buffer_clear(tb); in http_list_directory() 1155 : tb; in http_list_directory() 1172 if (out == tb) { in http_list_directory() 1222 if (out == tb) { in http_list_directory() 1232 if (out == tb) { in http_list_directory() 1584 if (!stat_cache_path_isdir(tb) in mod_dirlisting_cache_add() [all …]
|
| H A D | mod_redirect.c | 82 buffer * const tb = srv->tmp_buf; 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() 186 buffer * const tb = r->tmp_buf; in URIHANDLER_FUNC() local 188 &r->target, tb); in URIHANDLER_FUNC() 192 BUF_PTR_LEN(tb)); in URIHANDLER_FUNC()
|
| H A D | mod_rewrite.c | 105 buffer * const tb = srv->tmp_buf; 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() 305 buffer * const tb = r->tmp_buf; in process_rewrite_rules() local 306 rc = pcre_keyvalue_buffer_process(kvb, &ctx, &r->target, tb); in process_rewrite_rules() 307 if (HANDLER_FINISHED == rc && !buffer_is_blank(tb) && tb->ptr[0] == '/') { in process_rewrite_rules() 308 buffer_copy_buffer(&r->target, tb); in process_rewrite_rules()
|
| H A D | configfile.c | 234 buffer * const tb = srv->tmp_buf; in config_burl_normalize_cond() local 383 buffer * const tb = srv->tmp_buf; in config_warn_authn_module() local 2376 buffer_clear(tb); in config_remoteip_normalize_ipv6() 2378 buffer_append_str3(tb, in config_remoteip_normalize_ipv6() 2563 buffer * const tb = srv->tmp_buf; in config_set_defaults() local 2564 buffer_clear(tb); in config_set_defaults() 2573 buffer_truncate(tb, len); in config_set_defaults() 2578 if (-1 == stat(tb->ptr, &st1)) { in config_set_defaults() 2600 buffer * const tb = srv->tmp_buf; in config_set_defaults() local 2603 if (0 == stat(tb->ptr, &st1)) { in config_set_defaults() [all …]
|
| H A D | mod_scgi.c | 205 buffer * const tb = r->tmp_buf; in scgi_create_env() local 208 buffer_clear(tb); in scgi_create_env() 209 buffer_append_int(tb, buffer_clen(b)-10); in scgi_create_env() 210 buffer_append_char(tb, ':'); in scgi_create_env() 211 len = buffer_clen(tb); in scgi_create_env() 213 memcpy(b->ptr+offset, tb->ptr, len); in scgi_create_env()
|
| H A D | network.c | 233 buffer * const tb = srv->tmp_buf; in network_host_parse_addr() local 234 buffer_copy_buffer(tb, host); in network_host_parse_addr() 235 h = tb->ptr; in network_host_parse_addr() 242 h = tb->ptr+1; in network_host_parse_addr() 664 buffer * const tb = srv->tmp_buf; in network_socket_activation_to_env() local 665 buffer_clear(tb); in network_socket_activation_to_env() 666 buffer_append_int(tb, fd); in network_socket_activation_to_env() 667 setenv("LISTEN_FDS", tb->ptr, 1); in network_socket_activation_to_env() 668 buffer_clear(tb); in network_socket_activation_to_env() 669 buffer_append_int(tb, srv->pid); /* getpid() */ in network_socket_activation_to_env() [all …]
|
| H A D | mod_vhostdb_ldap.c | 67 buffer * const tb = srv->tmp_buf; in mod_vhostdb_dbconf_add_scheme() local 68 buffer_clear(tb); in mod_vhostdb_dbconf_add_scheme() 76 if (!buffer_is_blank(tb)) in mod_vhostdb_dbconf_add_scheme() 77 buffer_append_char(tb, ','); in mod_vhostdb_dbconf_add_scheme() 84 buffer_append_string_len(tb, CONST_STR_LEN("ldap://")); in mod_vhostdb_dbconf_add_scheme() 85 buffer_append_string_len(tb, b, (size_t)(e - b)); in mod_vhostdb_dbconf_add_scheme() 87 buffer_copy_buffer(host, tb); in mod_vhostdb_dbconf_add_scheme()
|
| H A D | mod_deflate.c | 326 buffer * const tb = r->tmp_buf; in mod_deflate_cache_file_name() local 327 buffer_copy_path_len2(tb, BUF_PTR_LEN(cache_dir), in mod_deflate_cache_file_name() 331 return tb; in mod_deflate_cache_file_name() 2027 buffer *tb = NULL; in REQUEST_FUNC() local 2061 tb = NULL; in REQUEST_FUNC() 2062 else if (0 != mkdir_for_file(tb->ptr)) in REQUEST_FUNC() 2063 tb = NULL; in REQUEST_FUNC() 2079 if (tb) mod_deflate_cache_file_open(hctx, tb); in REQUEST_FUNC() 2098 if (NULL == tb || 0 == mod_deflate_cache_file_finish(r, hctx, tb)) in REQUEST_FUNC() 2119 if (NULL == tb || 0 == mod_deflate_cache_file_finish(r, hctx, tb)) in REQUEST_FUNC() [all …]
|
| H A D | mod_auth.c | 1317 buffer * const tb = r->tmp_buf; in mod_auth_digest_validate_userstar() local 1319 buffer_urldecode_path(tb); in mod_auth_digest_validate_userstar() 1320 if (dp->ptr[e_userstar][0] == 'u' && !buffer_is_valid_UTF8(tb)) { in mod_auth_digest_validate_userstar() 1325 len = buffer_clen(tb); in mod_auth_digest_validate_userstar() 1331 for (ptr = tb->ptr; *ptr; ++ptr) { in mod_auth_digest_validate_userstar() 1342 ai->username = memcpy(ai->userbuf, tb->ptr, len); in mod_auth_digest_validate_userstar() 1477 buffer * const tb = r->tmp_buf; in mod_auth_digest_validate_nonce() local 1478 buffer_clear(tb); in mod_auth_digest_validate_nonce() 1543 buffer * const tb = r->tmp_buf; in mod_auth_check_digest() local 1544 buffer_copy_string_len(tb, ai.username, ai.ulen); in mod_auth_check_digest() [all …]
|
| H A D | h2.c | 1399 buffer * const tb = r->tmp_buf; in h2_parse_headers_frame() local 1401 char * const tbptr = tb->ptr; in h2_parse_headers_frame() 1403 ? tb->size in h2_parse_headers_frame() 2137 buffer * const tb = r->tmp_buf; in h2_send_headers() local 2140 unsigned char * const dst_end = (unsigned char *)tb->ptr + tb->size; in h2_send_headers() 2181 if (dst == (unsigned char *)tb->ptr) { in h2_send_headers() 2336 h2_send_hpack(r, con, tb->ptr, dlen, flags); in h2_send_headers() 2363 buffer * const tb = r->tmp_buf; in h2_send_headers_block() local 2366 unsigned char * const dst_end = (unsigned char *)tb->ptr + tb->size; in h2_send_headers_block() 2385 if (dst == (unsigned char *)tb->ptr) { in h2_send_headers_block() [all …]
|
| H A D | mod_authn_ldap.c | 158 buffer * const tb = srv->tmp_buf; in mod_authn_add_scheme() local 159 buffer_clear(tb); in mod_authn_add_scheme() 167 if (!buffer_is_blank(tb)) in mod_authn_add_scheme() 168 buffer_append_char(tb, ','); in mod_authn_add_scheme() 175 buffer_append_string_len(tb, CONST_STR_LEN("ldap://")); in mod_authn_add_scheme() 176 buffer_append_string_len(tb, b, (size_t)(e - b)); in mod_authn_add_scheme() 178 buffer_copy_buffer(host, tb); in mod_authn_add_scheme()
|
| H A D | chunk.c | 250 buffer * const tb = chunks_oversized ? chunks_oversized->mem : NULL; in chunk_push_oversized() local 251 if (tb && tb->size < sz) { in chunk_push_oversized() 254 c->mem = tb; in chunk_push_oversized() 320 buffer tb = *b; in chunk_buffer_yield() local 322 *cb = tb; in chunk_buffer_yield() 332 buffer tb = *b; in chunk_buffer_prepare_append() local 334 *cb = tb; in chunk_buffer_prepare_append() 335 if ((b->used = tb.used)) in chunk_buffer_prepare_append() 336 memcpy(b->ptr, tb.ptr, tb.used); in chunk_buffer_prepare_append()
|
| H A D | mod_fastcgi.c | 446 buffer * const tb = r->tmp_buf; in fcgi_recv_parse_loop() local 447 buffer_clear(tb); in fcgi_recv_parse_loop() 448 fastcgi_get_packet_body(tb, hctx, &packet); in fcgi_recv_parse_loop() 450 BUF_PTR_LEN(tb), "FastCGI-stderr:"); in fcgi_recv_parse_loop()
|
| H A D | server.c | 981 buffer * const tb = srv->tmp_buf; in server_graceful_state_bg() local 982 buffer_clear(tb); in server_graceful_state_bg() 983 buffer_append_int(tb, pid); in server_graceful_state_bg() 984 setenv("LIGHTTPD_PREV_GEN", tb->ptr, 1); in server_graceful_state_bg() 1682 buffer * const tb = srv->tmp_buf; in server_main_setup() local 1683 buffer_clear(tb); in server_main_setup() 1684 buffer_append_int(tb, srv->pid); in server_main_setup() 1685 buffer_append_char(tb, '\n'); in server_main_setup() 1686 if (-1 == write_all(pid_fd, BUF_PTR_LEN(tb))) { in server_main_setup()
|
| H A D | configparser.y | 261 buffer * const tb = ctx->srv->tmp_buf; in configparser_parse_condition() local 262 buffer_clear(tb); in configparser_parse_condition() 276 buffer_append_iovec(tb, iov, sizeof(iov)/sizeof(*iov)); in configparser_parse_condition() 280 BUF_PTR_LEN(tb)))) { in configparser_parse_condition() 288 buffer_copy_buffer(&dc->key, tb); in configparser_parse_condition() 309 if (!config_remoteip_normalize(rvalue, tb)) { in configparser_parse_condition()
|
| H A D | mod_proxy.c | 804 buffer * const tb = hctx->r->tmp_buf; in proxy_stdin_append() local 805 buffer_clear(tb); in proxy_stdin_append() 806 buffer_append_uint_hex_lc(tb, (uintmax_t)req_cqlen); in proxy_stdin_append() 807 buffer_append_string_len(tb, CONST_STR_LEN("\r\n")); in proxy_stdin_append() 809 const off_t len = (off_t)buffer_clen(tb) in proxy_stdin_append() 817 ? chunkqueue_append_mem(&hctx->wb, BUF_PTR_LEN(tb)) in proxy_stdin_append() 818 : chunkqueue_append_mem_min(&hctx->wb, BUF_PTR_LEN(tb)); in proxy_stdin_append()
|
| H A D | mod_status.c | 724 buffer * const tb = r->tmp_buf; in mod_status_handle_server_config() local 725 buffer_clear(tb); in mod_status_handle_server_config() 729 buffer_append_string_len(tb, CONST_STR_LEN("<br />")); in mod_status_handle_server_config() 731 buffer_append_string_len(tb, name, strlen(name)); in mod_status_handle_server_config() 773 mod_status_row_append(b, CONST_STR_LEN("Loaded Modules"), BUF_PTR_LEN(tb)); in mod_status_handle_server_config()
|
| H A D | configfile.h | 93 int config_remoteip_normalize(buffer *b, buffer *tb);
|
| H A D | connections.c | 953 buffer * const tb = r->tmp_buf; in __attribute_nonnull__() local 954 buffer_clear(tb); in __attribute_nonnull__() 955 http_request_state_append(tb, r->state); in __attribute_nonnull__() 957 "fd:%d id:%d state:%s%s", r->con->fd, r->h2id, tb->ptr, tag); in __attribute_nonnull__()
|
| /lighttpd1.4/src/t/ |
| H A D | test_configfile.c | 54 buffer * const tb = buffer_init(); in test_configfile_addrbuf_eq_remote_ip_mask() local 61 if (!config_remoteip_normalize(b, tb)) exit(-1); /*(bad test)*/ in test_configfile_addrbuf_eq_remote_ip_mask() 92 buffer_free(tb); in test_configfile_addrbuf_eq_remote_ip_mask()
|