| /lighttpd1.4/src/ |
| H A D | mod_cgi.c | 102 handler_ctx *hctx = ck_calloc(1, sizeof(*hctx)); in cgi_handler_ctx_init() local 106 return hctx; in cgi_handler_ctx_init() 111 free(hctx); in cgi_handler_ctx_free() 382 cgi_pid->hctx = hctx; in cgi_pid_add() 444 hctx->cgi_pid->hctx = NULL; in cgi_connection_close() 574 hctx->response, hctx->fdn)) { in cgi_recv_response() 737 hctx->fdntocgi = fdevent_register(ev, hctx->fdtocgi, cgi_handle_fdevent_send, hctx); in cgi_write_request() 941 hctx->cgi_pid = cgi_pid_add(p, pid, hctx); in cgi_create_env() 969 hctx->fdn = fdevent_register(ev, hctx->fd, cgi_handle_fdevent, hctx); in cgi_create_env() 1057 hctx->opts.pdata = hctx; in URIHANDLER_FUNC() [all …]
|
| H A D | mod_wstunnel.c | 393 if (mod_wstunnel_frame_send(hctx,hctx->frame.type_backend,b->ptr,n) < 0) { in wstunnel_recv_parse() 500 hctx->gw.opts.pdata = hctx; in wstunnel_handler_setup() 626 && (int32_t)hctx->conf.ping_interval + hctx->ping_ts < cur_ts) { in TRIGGER_FUNC() 1116 b->ptr[i] ^= hctx->frame.ctl.mask[hctx->frame.ctl.mask_cnt]; in unmask_payload() 1117 hctx->frame.ctl.mask_cnt = (hctx->frame.ctl.mask_cnt + 1) % 4; in unmask_payload() 1139 hctx->frame.type = hctx->frame.type_before; in recv_rfc_6455() 1144 hctx->frame.type_before = hctx->frame.type; in recv_rfc_6455() 1149 hctx->frame.type_before = hctx->frame.type; in recv_rfc_6455() 1221 hctx->frame.ctl.mask[hctx->frame.ctl.mask_cnt] = frame[i]; in recv_rfc_6455() 1317 if (hctx->hybivers >= 8) return recv_rfc_6455(hctx); in mod_wstunnel_frame_recv() [all …]
|
| H A D | mod_deflate.c | 243 handler_ctx * const hctx = ck_calloc(1, sizeof(*hctx)); in handler_ctx_init() local 246 return hctx; in handler_ctx_init() 262 free(hctx); in handler_ctx_free() 1415 if (0 == rc && hctx->bytes_in < hctx->bytes_out) in deflate_compress_cleanup() 1418 (long long)hctx->bytes_in, (long long)hctx->bytes_out); in deflate_compress_cleanup() 1557 &outparams, hctx, hctx->bytes_in); in mod_deflate_using_libdeflate() 2074 hctx->r = r; in REQUEST_FUNC() 2099 mod_deflate_note_ratio(r, hctx->bytes_out, hctx->bytes_in); in REQUEST_FUNC() 2105 hctx->bytes_in = hctx->bytes_out = 0; in REQUEST_FUNC() 2126 hctx->bytes_in = hctx->bytes_out = 0; in REQUEST_FUNC() [all …]
|
| H A D | mod_fastcgi.c | 201 if (-1 != hctx->wb_reqlen) { in fcgi_stdin_append() 217 if (hctx->wb.bytes_in == hctx->wb_reqlen) { in fcgi_stdin_append() 235 gw_host *host = hctx->host; in fcgi_create_env() 251 if (hctx->request_id == 0) { in fcgi_create_env() 293 hctx->wb_reqlen = -hctx->wb_reqlen; in fcgi_create_env() 295 fcgi_stdin_append(hctx); in fcgi_create_env() 322 if (chunkqueue_peek_data(hctx->rb, &ptr, &rd, hctx->r->conf.errh) < 0) in fastcgi_get_packet() 363 hctx->proc->pid, hctx->proc->connection_name->ptr); in fcgi_recv_0() 401 if (!hctx->response) { in fcgi_recv_parse_loop() 491 hctx->opts.pdata = hctx; /*(skip +255 for potential padding)*/ in fcgi_check_extension() [all …]
|
| H A D | gw_backend.c | 1107 if (hctx->handler_ctx_free) hctx->handler_ctx_free(hctx); in handler_ctx_free() 1779 hctx->next->prev = hctx; in gw_host_hctx_enq() 1788 hctx->prev->next = hctx->next; in gw_host_hctx_deq() 1790 hctx->host->hctxs= hctx->next; in gw_host_hctx_deq() 1793 hctx->next->prev = hctx->prev; in gw_host_hctx_deq() 1812 gw_proc_release(hctx->host, hctx->proc, hctx->conf.debug, in gw_backend_close() 1837 hctx->host = gw_host_get(r,hctx->ext,hctx->conf.balance,hctx->conf.debug); in gw_reconnect() 1941 hctx->fdn = fdevent_register(hctx->ev,hctx->fd,gw_handle_fdevent,hctx); in gw_write_request() 2089 if (hctx->backend_error) hctx->backend_error(hctx); in gw_backend_error() 2645 hctx->ext_auth = hctx->ext; in gw_check_extension() [all …]
|
| H A D | mod_ajp13.c | 215 ? hctx->request_id < MAX_WRITE_LIMIT ? hctx->request_id : MAX_WRITE_LIMIT in ajp13_stdin_append() 233 (chunkqueue_is_empty(&hctx->wb) || hctx->wb.first->type == MEM_CHUNK) in ajp13_stdin_append() 241 hctx->request_id -= (int)sent; in ajp13_stdin_append() 249 if (hctx->wb.bytes_in == hctx->wb_reqlen) { in ajp13_stdin_append_n() 265 hctx->request_id += (int)n; in ajp13_stdin_append_n() 269 ajp13_stdin_append(hctx); in ajp13_stdin_append_n() 639 hctx->wb_reqlen = -hctx->wb_reqlen; in ajp13_create_env() 778 hctx->proc->pid, hctx->proc->connection_name->ptr); in ajp13_recv_0() 804 hctx->proc->pid, hctx->proc->connection_name->ptr); in ajp13_recv_parse_loop() 980 hctx->opts.pdata = hctx; in ajp13_check_extension() [all …]
|
| H A D | mod_dirlisting.c | 140 handler_ctx *hctx = ck_calloc(1, sizeof(*hctx)); in mod_dirlisting_handler_ctx_init() local 142 return hctx; in mod_dirlisting_handler_ctx_init() 146 if (hctx->dp) in mod_dirlisting_handler_ctx_free() 160 if (hctx->jb) { in mod_dirlisting_handler_ctx_free() 170 free(hctx); in mod_dirlisting_handler_ctx_free() 998 hctx->path = ck_malloc(dlen + hctx->name_max + 1); in http_open_directory() 1001 hctx->path_file = hctx->path + dlen; in http_open_directory() 1006 hctx->dp = opendir(hctx->path); in http_open_directory() 1009 hctx->dp = (hctx->dfd >= 0) ? fdopendir(hctx->dfd) : NULL; in http_open_directory() 1392 hctx->jfd = -1; in URIHANDLER_FUNC() [all …]
|
| H A D | mod_gnutls.c | 174 free(hctx); in handler_ctx_free() 879 if (hctx->verify_status == 0 && hctx->conf.ssl_ca_dn_file) { in mod_gnutls_verify_cb() 906 if (hctx->verify_status != 0 && hctx->conf.ssl_verifyclient_enforce) { in mod_gnutls_verify_cb() 2380 return mod_gnutls_write_err(con, hctx, wr, hctx->pending_write); in connection_write_cq_ssl() 2465 return mod_gnutls_write_err(con, hctx, wr, hctx->pending_write); in connection_write_cq_ssl_ktls() 2510 return mod_gnutls_read_err(hctx->con, hctx, rc); in mod_gnutls_ssl_handshake() 2536 hctx->alpn = 0; in mod_gnutls_ssl_handshake() 2601 hctx->r = r; in CONNECTION_FUNC() 2602 hctx->con = con; in CONNECTION_FUNC() 2629 gnutls_session_set_ptr(hctx->ssl, hctx); in CONNECTION_FUNC() [all …]
|
| H A D | mod_mbedtls.c | 228 free(hctx); in handler_ctx_free() 830 mbedtls_ssl_conf_verify(hctx->ssl_ctx, mod_mbedtls_verify_cb, hctx); in mod_mbedtls_conf_verify() 1175 UNUSED(hctx); in mod_mbedtls_alpn_h2_policy() 1220 hctx->alpn = proto; in mod_mbedtls_alpn_selected() 2134 mbedtls_ssl_conf_sni(hctx->ssl_ctx, mod_mbedtls_SNI, hctx); in mod_mbedtls_ssl_handshake() 2148 rc = ssl_parse_client_hello(&hctx->ssl, hctx); in mod_mbedtls_ssl_handshake() 2328 hctx->r = r; in CONNECTION_FUNC() 2329 hctx->con = con; in CONNECTION_FUNC() 2337 int rc = mbedtls_ssl_setup(&hctx->ssl, hctx->ssl_ctx); in CONNECTION_FUNC() 2350 mbedtls_ssl_set_user_data_p(&hctx->ssl, hctx); in CONNECTION_FUNC() [all …]
|
| H A D | mod_openssl.c | 196 if (hctx->ssl) SSL_free(hctx->ssl); in handler_ctx_free() 197 free(hctx); in handler_ctx_free() 946 if (hctx->renegotiations >= 0) ++hctx->renegotiations; in ssl_info_callback() 971 handler_ctx *hctx; in verify_callback() local 3109 return mod_openssl_write_err(hctx->ssl, (int)wr, con, hctx->errh); in connection_write_cq_ssl_ktls() 3183 && (hctx->conf.ssl_read_ahead || SSL_pending(hctx->ssl) > 0)); in connection_read_cq_ssl() 3301 hctx->r = r; in CONNECTION_FUNC() 3302 hctx->con = con; in CONNECTION_FUNC() 3311 && SSL_set_app_data(hctx->ssl, hctx) in CONNECTION_FUNC() 3336 if (-1 == hctx->close_notify) shutdown(hctx->con->fd, SHUT_WR); in mod_openssl_detach() [all …]
|
| H A D | mod_wolfssl.c | 217 if (hctx->ssl) SSL_free(hctx->ssl); in handler_ctx_free() 218 free(hctx); in handler_ctx_free() 1135 if (hctx->renegotiations >= 0) ++hctx->renegotiations; in ssl_info_callback() 1160 handler_ctx *hctx; in verify_callback() local 2865 if (hctx->alpn) { in connection_read_cq_ssl() 2884 && (hctx->conf.ssl_read_ahead || SSL_pending(hctx->ssl) > 0)); in connection_read_cq_ssl() 3001 hctx->r = r; in CONNECTION_FUNC() 3002 hctx->con = con; in CONNECTION_FUNC() 3011 && SSL_set_app_data(hctx->ssl, hctx) in CONNECTION_FUNC() 3036 if (-1 == hctx->close_notify) shutdown(hctx->con->fd, SHUT_WR); in mod_openssl_detach() [all …]
|
| H A D | mod_proxy.c | 812 if (-1 != hctx->wb_reqlen) in proxy_stdin_append() 813 hctx->wb_reqlen += (hctx->wb_reqlen >= 0) ? len : -len; in proxy_stdin_append() 815 (chunkqueue_is_empty(&hctx->wb) || hctx->wb.first->type == MEM_CHUNK) in proxy_stdin_append() 824 if (hctx->wb.bytes_in == hctx->wb_reqlen) {/*hctx->r->reqbody_length >= 0*/ in proxy_stdin_append() 862 if (hctx->conf.replace_http_host && !buffer_is_blank(hctx->gw.host->id)) { in proxy_create_env() 863 if (hctx->gw.conf.debug > 1) { in proxy_create_env() 1029 hctx->gw.wb_reqlen = -hctx->gw.wb_reqlen; in proxy_create_env() 1031 proxy_stdin_append(&hctx->gw); in proxy_create_env() 1046 gw_set_transparent(&hctx->gw); in proxy_create_env_connect() 1134 hctx->gw.opts.pdata = hctx; in mod_proxy_check_extension() [all …]
|
| H A D | mod_setenv.c | 37 static void handler_ctx_free(handler_ctx *hctx) { in handler_ctx_free() argument 38 free(hctx); in handler_ctx_free() 185 handler_ctx *hctx = r->plugin_ctx[p->id]; in URIHANDLER_FUNC() local 186 if (!hctx) in URIHANDLER_FUNC() 188 else if (hctx->handled) in URIHANDLER_FUNC() 190 hctx->handled = 1; in URIHANDLER_FUNC() 220 handler_ctx *hctx = r->plugin_ctx[p->id]; in REQUEST_FUNC() local 221 if (NULL == hctx) return HANDLER_GO_ON; in REQUEST_FUNC() 223 hctx->handled = 2; in REQUEST_FUNC() 250 if (NULL == hctx) return HANDLER_GO_ON; in REQUEST_FUNC() [all …]
|
| H A D | mod_nss.c | 216 free(hctx); in handler_ctx_free() 1015 if (hctx->verify_status == 0 && hctx->conf.ssl_ca_dn_file) { in mod_nss_verify_cb() 1035 if (hctx->verify_status != 0 && hctx->conf.ssl_verifyclient_enforce) { in mod_nss_verify_cb() 1309 UNUSED(hctx); in mod_nss_alpn_h2_policy() 2268 if (hctx->alpn && hctx->handshake) { in connection_read_cq_ssl() 2278 hctx->alpn = 0; in connection_read_cq_ssl() 2304 hctx->r = r; in CONNECTION_FUNC() 2305 hctx->con = con; in CONNECTION_FUNC() 2336 if (SSL_SNISocketConfigHook(hctx->ssl, mod_nss_SNI, hctx) < 0) { in CONNECTION_FUNC() 2393 if (-1 == hctx->close_notify) shutdown(hctx->con->fd, SHUT_WR); in mod_nss_detach() [all …]
|
| H A D | mod_scgi.c | 181 gw_host *host = hctx->host; in scgi_create_env() 182 request_st * const r = hctx->r; in scgi_create_env() 204 if (hctx->conf.proto == LI_PROTOCOL_SCGI) { in scgi_create_env() 232 hctx->wb_reqlen = buffer_clen(b) - offset; in scgi_create_env() 235 hctx->wb.bytes_in -= (off_t)offset; in scgi_create_env() 236 hctx->wb.bytes_out -= (off_t)offset; in scgi_create_env() 243 hctx->wb_reqlen = -hctx->wb_reqlen; in scgi_create_env() 264 handler_ctx *hctx = r->plugin_ctx[p->id]; in scgi_check_extension() local 265 hctx->opts.backend = BACKEND_SCGI; in scgi_check_extension() 266 hctx->create_env = scgi_create_env; in scgi_check_extension() [all …]
|
| H A D | mod_maxminddb.c | 461 if (*hctx && sock_addr_is_addr_eq((sock_addr *)&(*hctx)->addr, dst_addr)) { in REQUEST_FUNC() 462 const array * const env = (*hctx)->env; in REQUEST_FUNC() 474 if (*hctx && r->http_version <= HTTP_VERSION_1_1) { in REQUEST_FUNC() 475 env = (*hctx)->env; in REQUEST_FUNC() 479 else if ((*hctx) == NULL) { in REQUEST_FUNC() 480 (*hctx) = ck_malloc(sizeof(handler_ctx)); in REQUEST_FUNC() 504 handler_ctx **hctx = in CONNECTION_FUNC() local 506 if (NULL != *hctx) { in CONNECTION_FUNC() 507 array_free((*hctx)->env); in CONNECTION_FUNC() 508 free(*hctx); in CONNECTION_FUNC() [all …]
|
| H A D | mod_extforward.c | 138 if (NULL != hctx->env) in handler_ctx_free() 139 array_free(hctx->env); in handler_ctx_free() 140 free(hctx); in handler_ctx_free() 533 if (!*hctx) in is_connection_trusted_cached() 1052 if (NULL != hctx && hctx->ssl_client_verify && NULL != hctx->env in URIHANDLER_FUNC() 1115 if (NULL == hctx || NULL == hctx->env) return HANDLER_GO_ON; in REQUEST_FUNC() 1150 if (NULL != hctx) { in CONNECTION_FUNC() 1580 handler_ctx * const hctx = in mod_extforward_hap_PROXY_v2() local 1609 if (NULL == hctx->env) hctx->env = array_init(8); in mod_extforward_hap_PROXY_v2() 1656 if (NULL == hctx->env) hctx->env = array_init(8); in mod_extforward_hap_PROXY_v2() [all …]
|
| H A D | mod_sockproxy.c | 131 static handler_t sockproxy_create_env_connect(handler_ctx *hctx) { in sockproxy_create_env_connect() argument 132 request_st * const r = hctx->r; in sockproxy_create_env_connect() 134 gw_set_transparent(hctx); in sockproxy_create_env_connect() 159 handler_ctx *hctx = r->plugin_ctx[p->id]; in mod_sockproxy_connection_accept() local 160 hctx->opts.backend = BACKEND_PROXY; in mod_sockproxy_connection_accept() 161 hctx->create_env = sockproxy_create_env_connect; in mod_sockproxy_connection_accept() 162 hctx->response = chunk_buffer_acquire(); in mod_sockproxy_connection_accept()
|
| H A D | gw_backend.h | 334 handler_t(*stdin_append)(struct gw_handler_ctx *hctx); 335 handler_t(*create_env)(struct gw_handler_ctx *hctx); 338 void(*backend_error)(struct gw_handler_ctx *hctx); 339 void(*handler_ctx_free)(void *hctx); 368 void gw_set_transparent(gw_handler_ctx *hctx);
|
| H A D | mod_rewrite.c | 285 uintptr_t * const hctx = (uintptr_t *)(r->plugin_ctx + p->id); in process_rewrite_rules() local 286 if (((++*hctx) & 0x1FF) > 100) { in process_rewrite_rules() 289 if (*hctx & REWRITE_STATE_FINISHED) return HANDLER_GO_ON; in process_rewrite_rules() 309 uintptr_t * const hctx = (uintptr_t *)(r->plugin_ctx + p->id); in process_rewrite_rules() local 310 *hctx |= REWRITE_STATE_REWRITTEN; in process_rewrite_rules() 312 if (ctx.m < kvb->x1) *hctx |= REWRITE_STATE_FINISHED; in process_rewrite_rules()
|
| H A D | mod_ssi.c | 74 handler_ctx *hctx = ck_calloc(1, sizeof(*hctx)); in handler_ctx_init() local 75 hctx->errh = errh; in handler_ctx_init() 76 hctx->timefmt = &p->timefmt; in handler_ctx_init() 77 hctx->stat_fn = &p->stat_fn; in handler_ctx_init() 78 hctx->ssi_vars = p->ssi_vars; in handler_ctx_init() 79 hctx->ssi_cgi_env = p->ssi_cgi_env; in handler_ctx_init() 81 return hctx; in handler_ctx_init() 85 chunkqueue_reset(&hctx->wq); in handler_ctx_free() 86 free(hctx); in handler_ctx_free() 1662 if (hctx) { in mod_ssi_handle_request_reset() [all …]
|
| H A D | mod_skeleton.c | 48 static void handler_ctx_free(handler_ctx *hctx) { 49 free(hctx);
|
| H A D | h2.c | 1930 void ** const hctx = con->plugin_ctx+0; /*(0 idx used for h2)*/ in h2_read_client_connection_preface() local 1932 (int(*)(struct connection *, chunkqueue *, off_t))(uintptr_t)(*hctx); in h2_read_client_connection_preface() 1938 *hctx = NULL; in h2_read_client_connection_preface()
|
| /lighttpd1.4/src/t/ |
| H A D | test_mod_ssi.c | 20 buffer_clear(hctx->timefmt); in test_mod_ssi_reset() 59 test_mod_ssi_reset(r, hctx); in test_mod_ssi_read_fd() 72 test_mod_ssi_reset(r, hctx); in test_mod_ssi_read_fd() 76 hctx->conf.ssi_exec = 1; in test_mod_ssi_read_fd() 78 test_mod_ssi_reset(r, hctx); in test_mod_ssi_read_fd() 90 hctx->conf.ssi_exec = 0; in test_mod_ssi_read_fd() 117 test_mod_ssi_reset(r, hctx); in test_mod_ssi_read_fd() 136 test_mod_ssi_reset(r, hctx); in test_mod_ssi_read_fd() 155 assert(NULL != hctx); in test_mod_ssi() 157 test_mod_ssi_read_fd(&r, hctx); in test_mod_ssi() [all …]
|
| /lighttpd1.4/ |
| H A D | NEWS | 450 * [mbedtls] save (mbedtls_ssl_config *) in hctx 1105 * [core] add comment for FastCGI mem use in hctx->rb (#3033)
|